소스 검색

问题处理

yzc 1 년 전
부모
커밋
6e101437d1
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      hx-tenant/src/main/java/com/fjhx/tenant/controller/tenant/RoleTenantController.java

+ 2 - 2
hx-tenant/src/main/java/com/fjhx/tenant/controller/tenant/RoleTenantController.java

@@ -88,9 +88,9 @@ public class RoleTenantController extends BaseController {
             throw new ServiceException("您无权操作该数据");
             throw new ServiceException("您无权操作该数据");
         }
         }
         String tenantId = role.getTenantId();
         String tenantId = role.getTenantId();
-        if (!user.isAdmin()) {
+        if (!user.isAdmin() && !user.getTenantId().equals(tenantId)) {
             //非超管 只能改本租户的数据
             //非超管 只能改本租户的数据
-            tenantId = SecurityUtils.getTenantId();
+            throw new ServiceException("您无权操作其他租户的数据");
         }
         }
         if (ObjectUtil.isEmpty(tenantId)) {
         if (ObjectUtil.isEmpty(tenantId)) {
             throw new ServiceException("租户id不能为空");
             throw new ServiceException("租户id不能为空");