Browse Source

Merge pull request #225 from colinin/4.2

Users can get own menu's if the token is valid
pull/252/head
cKey 5 years ago
committed by GitHub
parent
commit
a8461ffd71
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/MenuAppService.cs

6
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/Menus/MenuAppService.cs

@ -14,7 +14,7 @@ using Volo.Abp.Users;
namespace LINGYUN.Platform.Menus
{
[Authorize(PlatformPermissions.Menu.Default)]
[Authorize]
public class MenuAppService : PlatformApplicationServiceBase, IMenuAppService
{
protected DataItemMappingOptions DataItemMapping { get; }
@ -37,7 +37,6 @@ namespace LINGYUN.Platform.Menus
DataItemMapping = options.Value;
}
[Authorize]
public virtual async Task<ListResultDto<MenuDto>> GetCurrentUserMenuListAsync(GetMenuInput input)
{
var myMenus = await MenuRepository.GetUserMenusAsync(
@ -49,6 +48,7 @@ namespace LINGYUN.Platform.Menus
ObjectMapper.Map<List<Menu>, List<MenuDto>>(myMenus));
}
[Authorize(PlatformPermissions.Menu.Default)]
public virtual async Task<MenuDto> GetAsync(Guid id)
{
var menu = await MenuRepository.GetAsync(id);
@ -56,6 +56,7 @@ namespace LINGYUN.Platform.Menus
return ObjectMapper.Map<Menu, MenuDto>(menu);
}
[Authorize(PlatformPermissions.Menu.Default)]
public virtual async Task<ListResultDto<MenuDto>> GetAllAsync(MenuGetAllInput input)
{
var menus = await MenuRepository.GetAllAsync(
@ -66,6 +67,7 @@ namespace LINGYUN.Platform.Menus
ObjectMapper.Map<List<Menu>, List<MenuDto>>(menus));
}
[Authorize(PlatformPermissions.Menu.Default)]
public virtual async Task<PagedResultDto<MenuDto>> GetListAsync(MenuGetListInput input)
{
var count = await MenuRepository.GetCountAsync(input.Filter, input.PlatformType, input.ParentId, input.LayoutId);

Loading…
Cancel
Save