diff --git a/src/EventHub.Admin.Application.Contracts/Events/EventListFilterDto.cs b/src/EventHub.Admin.Application.Contracts/Events/EventListFilterDto.cs index 08fed91..bf5cb36 100644 --- a/src/EventHub.Admin.Application.Contracts/Events/EventListFilterDto.cs +++ b/src/EventHub.Admin.Application.Contracts/Events/EventListFilterDto.cs @@ -7,11 +7,8 @@ namespace EventHub.Admin.Events { public DateTime? MinStartTime { get; set; } public DateTime? MaxStartTime { get; set; } - public string Title { get; set; } - public string OrganizationDisplayName { get; set; } - public int? MinAttendeeCount { get; set; } public int? MaxAttendeeCount { get; set; } } diff --git a/src/EventHub.Admin.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs b/src/EventHub.Admin.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs index 7e2e6b0..546274e 100644 --- a/src/EventHub.Admin.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs +++ b/src/EventHub.Admin.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs @@ -19,9 +19,11 @@ namespace EventHub.Admin.Permissions var eventPermissions = eventHubGroup.AddPermission(EventHubPermissions.Events.Default, L("Permission:EventManagement")); eventPermissions.AddChild(EventHubPermissions.Events.Update, L("Permission:Edit")); - var eventRegistrationPermission = eventHubGroup.AddPermission(EventHubPermissions.Events.Registrations.Default, L("Permission:RegistrationManagement")); - eventRegistrationPermission.AddChild(EventHubPermissions.Events.Registrations.AddAttendee, L("Permission:AddAttendee")); - eventRegistrationPermission.AddChild(EventHubPermissions.Events.Registrations.RemoveAttendee, L("Permission:RemoveAttendee")); + var eventRegistrationPermissions = eventHubGroup.AddPermission(EventHubPermissions.Events.Registrations.Default, L("Permission:RegistrationManagement")); + eventRegistrationPermissions.AddChild(EventHubPermissions.Events.Registrations.AddAttendee, L("Permission:AddAttendee")); + eventRegistrationPermissions.AddChild(EventHubPermissions.Events.Registrations.RemoveAttendee, L("Permission:RemoveAttendee")); + + var userPermissions = eventHubGroup.AddPermission(EventHubPermissions.Users.Default, L("Permission:UserManagement")); } private static LocalizableString L(string name) diff --git a/src/EventHub.Admin.Application.Contracts/Permissions/EventHubPermissions.cs b/src/EventHub.Admin.Application.Contracts/Permissions/EventHubPermissions.cs index 98ff749..f8d9f10 100644 --- a/src/EventHub.Admin.Application.Contracts/Permissions/EventHubPermissions.cs +++ b/src/EventHub.Admin.Application.Contracts/Permissions/EventHubPermissions.cs @@ -29,5 +29,10 @@ public const string RemoveAttendee = Default + ".RemoveAttendee"; } } + + public static class Users + { + public const string Default = GroupName + ".Users"; + } } } \ No newline at end of file diff --git a/src/EventHub.Admin.Application/Users/UserAppService.cs b/src/EventHub.Admin.Application/Users/UserAppService.cs index 398e51b..0300bdb 100644 --- a/src/EventHub.Admin.Application/Users/UserAppService.cs +++ b/src/EventHub.Admin.Application/Users/UserAppService.cs @@ -3,12 +3,15 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Dynamic.Core; using System.Threading.Tasks; +using EventHub.Admin.Permissions; +using Microsoft.AspNetCore.Authorization; using Volo.Abp.Application.Dtos; using Volo.Abp.Domain.Repositories; using Volo.Abp.Identity; namespace EventHub.Admin.Users { + [Authorize(EventHubPermissions.Users.Default)] public class UserAppService : EventHubAdminAppService, IUserAppService { private readonly IRepository _identityUserRepository; @@ -35,7 +38,6 @@ namespace EventHub.Admin.Users query = query.PageBy(input); var users = await AsyncExecuter.ToListAsync(query); - return new PagedResultDto(totalCount, ObjectMapper.Map, List>(users)); } } diff --git a/src/EventHub.Admin.HttpApi.Host/appsettings.json b/src/EventHub.Admin.HttpApi.Host/appsettings.json index aca9ac1..9f60a10 100644 --- a/src/EventHub.Admin.HttpApi.Host/appsettings.json +++ b/src/EventHub.Admin.HttpApi.Host/appsettings.json @@ -10,5 +10,9 @@ "RequireHttpsMetadata": "true", "SwaggerClientId": "EventHub_Swagger", "SwaggerClientSecret": "1q2w3e*" + }, + "AppUrls": { + "Account": "https://localhost:44313", + "Admin": "https://localhost:44307" } } diff --git a/src/EventHub.Admin.Web/Components/UserPicker/UserPicker.razor b/src/EventHub.Admin.Web/Components/UserPicker/UserPicker.razor index 2f089a3..9f44ecc 100644 --- a/src/EventHub.Admin.Web/Components/UserPicker/UserPicker.razor +++ b/src/EventHub.Admin.Web/Components/UserPicker/UserPicker.razor @@ -32,8 +32,8 @@ @if (SelectAllUsers.ContainsKey(context.Id)) - { - + { + } diff --git a/src/EventHub.Admin.Web/Pages/AttendeeDetail.razor b/src/EventHub.Admin.Web/Pages/AttendeeDetail.razor index f99c45b..bc1f3d2 100644 --- a/src/EventHub.Admin.Web/Pages/AttendeeDetail.razor +++ b/src/EventHub.Admin.Web/Pages/AttendeeDetail.razor @@ -1,4 +1,4 @@ -@page "/events/{EventId:guid}/attendees" +@page "/event/{EventId:guid}/attendees" @using EventHub.Admin.Web.Components.UserPicker @using EventHub.Admin.Events.Registrations @using EventHub.Admin.Permissions diff --git a/src/EventHub.Admin.Web/Pages/EventManagement.razor b/src/EventHub.Admin.Web/Pages/EventManagement.razor index 8d6cee9..19c70b8 100644 --- a/src/EventHub.Admin.Web/Pages/EventManagement.razor +++ b/src/EventHub.Admin.Web/Pages/EventManagement.razor @@ -3,6 +3,7 @@ @using EventHub.Admin.Permissions @using EventHub.Admin.Events @using EventHub.Events +@using Volo.Abp.AspNetCore.Components.Notifications @inherits EventHubComponentBase @attribute [Authorize(EventHubPermissions.Events.Default)] @inject IEventAppService EventAppService @@ -10,12 +11,10 @@ - @* ************************* PAGE HEADER ************************* *@

@L["Events"]

- @* ************************* SEARCH ************************* *@
@@ -57,7 +56,6 @@
- @* ************************* DATA GRID ************************* *@ @@ -107,8 +105,6 @@
-@* ************************* EDIT MODAL ************************* *@ -
@@ -177,7 +173,7 @@ { - @L["OnlineLink"] + @L["OnlineLink"] * @@ -190,7 +186,7 @@ { - @L["Country"] + @L["Country"] *