diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonService/BaseRolePersonService.go b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonService/BaseRolePersonService.go index 605750f5..6a5f65ed 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonService/BaseRolePersonService.go +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonService/BaseRolePersonService.go @@ -245,7 +245,7 @@ func (s *Rpc) CheckDataPrivilege(ctx context.Context, in *BaseRolePersonProto.Ch var reply BaseRolePersonProto.Reply //是不是受白名单约束 - if in.InterName=="/base/organization/PageEnableEduInfo"{ + if in.InterName == "/base/organization/PageEnableEduInfo" { reply.Success = true reply.Message = "白名单,检查通过!" return &reply, nil @@ -304,7 +304,11 @@ func (s *Rpc) CheckDataPrivilege(ctx context.Context, in *BaseRolePersonProto.Ch found = false for i := range list { 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 break }