Просмотр исходного кода

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

zuohuaijun 2 лет назад
Родитель
Сommit
062f81c678
1 измененных файлов с 3 добавлено и 1 удалено
  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 =>
             {
                 if (u.DataScope == DataScopeEnum.Define)
+                {
                     customDataScopeRoleIdList.Add(u.Id);
-                    strongerDataScopeType = (int)u.DataScope;//自定义数据范围的时候 也要更新MaxDataScope
+                    strongerDataScopeType = (int)u.DataScope; // 自定义数据权限时也要更新最大范围
+                }
                 else if ((int)u.DataScope <= strongerDataScopeType)
                     strongerDataScopeType = (int)u.DataScope;
             });