feat: 完善禁止无权限用户登录

This commit is contained in:
陈淳
2024-04-28 11:45:13 +08:00
parent 8c343fb01f
commit 368b4fcfd4

View File

@@ -79,6 +79,10 @@ namespace Yi.Framework.Rbac.Domain.Managers
{
throw new UserFriendlyException(UserConst.No_Role);
}
if (userInfo.PermissionCodes.Count() ==0)
{
throw new UserFriendlyException(UserConst.No_Permission);
}
//这里抛出一个登录的事件
if (_httpContextAccessor.HttpContext is not null)
{