Explorar o código

😊修复超管机构管理权限

zuohuaijun %!s(int64=3) %!d(string=hai) anos
pai
achega
6bd4de2bec
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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;
     }