Merge branch 'refs/heads/abp' into digital-collectibles
# Conflicts: # Yi.Abp.Net8/src/Yi.Abp.Web/YiAbpWebModule.cs
This commit is contained in:
@@ -423,13 +423,13 @@ namespace Yi.Framework.Rbac.Application.Services
|
||||
{
|
||||
//将后端菜单转换成前端路由,组件级别需要过滤
|
||||
output =
|
||||
ObjectMapper.Map<List<MenuDto>, List<MenuAggregateRoot>>(menus).Vue3RuoYiRouterBuild();
|
||||
ObjectMapper.Map<List<MenuDto>, List<MenuAggregateRoot>>(menus.Where(x=>x.MenuSource==MenuSourceEnum.Ruoyi).ToList()).Vue3RuoYiRouterBuild();
|
||||
}
|
||||
else if (routerType == "pure")
|
||||
{
|
||||
//将后端菜单转换成前端路由,组件级别需要过滤
|
||||
output =
|
||||
ObjectMapper.Map<List<MenuDto>, List<MenuAggregateRoot>>(menus).Vue3PureRouterBuild();
|
||||
ObjectMapper.Map<List<MenuDto>, List<MenuAggregateRoot>>(menus.Where(x=>x.MenuSource==MenuSourceEnum.Pure).ToList()).Vue3PureRouterBuild();
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace Yi.Framework.Rbac.Domain.Shared.Dtos
|
||||
public HashSet<RoleDto> Roles { get; set; } = new();
|
||||
public HashSet<MenuDto> Menus { get; set; } = new();
|
||||
|
||||
public List<string> RoleCodes { get; set; } = new();
|
||||
public List<string> PermissionCodes { get; set; } = new();
|
||||
public HashSet<string> RoleCodes { get; set; } = new();
|
||||
public HashSet<string> PermissionCodes { get; set; } = new();
|
||||
}
|
||||
|
||||
public class UserDto
|
||||
|
||||
@@ -217,8 +217,8 @@ namespace Yi.Framework.Rbac.Domain.Managers
|
||||
}
|
||||
else
|
||||
{
|
||||
dto.PermissionCodes?.ForEach(per => AddToClaim(claims, TokenTypeConst.Permission, per));
|
||||
dto.RoleCodes?.ForEach(role => AddToClaim(claims, AbpClaimTypes.Role, role));
|
||||
dto.PermissionCodes?.ToList()?.ForEach(per => AddToClaim(claims, TokenTypeConst.Permission, per));
|
||||
dto.RoleCodes?.ToList()?.ForEach(role => AddToClaim(claims, AbpClaimTypes.Role, role));
|
||||
}
|
||||
|
||||
return claims;
|
||||
|
||||
Reference in New Issue
Block a user