fix 增加非高级角色处理
This commit is contained in:
@@ -94,9 +94,12 @@ public class RoleService : IRoleService
|
||||
var myi = _roles.IndexOf(myRole);
|
||||
|
||||
var ii = _roles.IndexOf(role.Name);
|
||||
if (ii != -1)
|
||||
{
|
||||
if (ii <= myi)
|
||||
{
|
||||
throw new UserFriendlyException("不可操作当前用户");
|
||||
throw new UserFriendlyException($"不可操作当前用户({role.Name})");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user