master
huanghai 5 years ago
parent 197d858042
commit 45025c077a

@ -304,7 +304,11 @@ func (s *Rpc) CheckDataPrivilege(ctx context.Context, in *BaseRolePersonProto.Ch
found = false found = false
for i := range list { for i := range list {
for j := range areaCodes { for j := range areaCodes {
if list[i]["rule_id"].(string) == areaCodes[j] { //如果是市级权限,而且操作的是市以下的县区
if list[i]["rule_id"].(string)[len(list[i]["rule_id"].(string))-2:] == "00" && list[i]["rule_id"].(string)[0:4] == areaCodes[j][0:4] {
found = true
break
} else if list[i]["rule_id"].(string) == areaCodes[j] {//如果是本级
found = true found = true
break break
} }

Loading…
Cancel
Save