Quellcode durchsuchen

😁修改自定义数据范围 + 多个角色时错误 感谢@tufork_admin

zuohuaijun vor 2 Jahren
Ursprung
Commit
062f81c678
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 3 1
      Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs

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

@@ -255,8 +255,10 @@ public class SysOrgService : IDynamicApiController, ITransient
             roleList.ForEach(u =>
             roleList.ForEach(u =>
             {
             {
                 if (u.DataScope == DataScopeEnum.Define)
                 if (u.DataScope == DataScopeEnum.Define)
+                {
                     customDataScopeRoleIdList.Add(u.Id);
                     customDataScopeRoleIdList.Add(u.Id);
-                    strongerDataScopeType = (int)u.DataScope;//自定义数据范围的时候 也要更新MaxDataScope
+                    strongerDataScopeType = (int)u.DataScope; // 自定义数据权限时也要更新最大范围
+                }
                 else if ((int)u.DataScope <= strongerDataScopeType)
                 else if ((int)u.DataScope <= strongerDataScopeType)
                     strongerDataScopeType = (int)u.DataScope;
                     strongerDataScopeType = (int)u.DataScope;
             });
             });