Sfoglia il codice sorgente

😊修复超管机构管理权限

zuohuaijun 2 anni fa
parent
commit
6bd4de2bec
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs

+ 2 - 1
Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs

@@ -66,7 +66,8 @@ public class SysOrgService : IDynamicApiController, ITransient
         await iSugarQueryable.ToTreeAsync(u => u.Children, u => u.Pid, input.Id, userOrgIdList.Select(d => (object)d).ToArray());
 
         // 递归禁用没权限的机构(防止用户修改或创建无权的机构和用户)
-        HandlerOrgTree(orgTree, userOrgIdList);
+        if (!_userManager.SuperAdmin)
+            HandlerOrgTree(orgTree, userOrgIdList);
 
         return orgTree;
     }