TRX 1 anno fa
parent
commit
aa99eb58ae

+ 1 - 1
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/org/IndexService.java

@@ -207,7 +207,7 @@ public class IndexService {
         tokenModel.setUserInfo(userModel);
 
         // 得到用户在企业的权限列表
-        ResultContent<Set<String>> authContent = roleServiceImpl.getOrganizationAuth(organization.getOid());
+        ResultContent<Set<String>> authContent = roleServiceImpl.getOrganizationAuth(organization.getOid(), userModel.getUserId());
         if (authContent.isSuccess()) {
             tokenModel.setAuths(authContent.getContent());
         }

+ 4 - 2
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/org/RoleServiceImpl.java

@@ -389,11 +389,13 @@ public class RoleServiceImpl extends SuperService {
      * @param oid
      * @return
      */
-    public ResultContent<Set<String>> getOrganizationAuth(String oid) {
+    public ResultContent<Set<String>> getOrganizationAuth(String oid, String userId) {
         if (StringUtils.isEmpty(oid)) {
             oid = getCurrentOid();
         }
-        String userId = getCurrentUserId();
+        if (StringUtils.isEmpty(userId)) {
+            userId = getCurrentUserId();
+        }
         Set<String> auth = new HashSet<>();
         if (StringUtils.isEmpty(oid)) {
             return ResultContent.buildSuccess(auth);