mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 02:11:10 +00:00
Adds authorization permissions administrator dashboard
This commit is contained in:
1 parent
152cb48050
commit
583b8db865
106 files changed
+5916
-2085
No files matched your search
+1
-1
@@ -14,7 +14,7 @@ namespace Lumina.Application.Core.Admin.Authorization.Roles.Commands.UpdateRole;
|
||||
/// </summary>
|
||||
/// <param name="RoleId">The Id of the role.</param>
|
||||
/// <param name="RoleName">The name of the role.</param>
|
||||
/// <param name="Permissions">The collection or permissions of the role.</param>
|
||||
/// <param name="Permissions">The collection of Ids of the permissions of the role.</param>
|
||||
[DebuggerDisplay("RoleName: {RoleName}")]
|
||||
public record UpdateRoleCommand(
|
||||
Guid RoleId,
|
||||
|
||||
+1
@@ -51,6 +51,7 @@ public class GetRolePermissionsQueryHandler : IRequestHandler<GetRolePermissions
|
||||
bool isAdmin = await _authorizationService.IsInRoleAsync(_currentUserService.UserId!.Value, "Admin", cancellationToken).ConfigureAwait(false);
|
||||
if (!isAdmin)
|
||||
return Errors.Authorization.NotAuthorized;
|
||||
// get the role from the repository and return its role permissions
|
||||
ErrorOr<RoleEntity?> getRoleResult = await _roleRepository.GetByIdAsync(request.RoleId, cancellationToken).ConfigureAwait(false);
|
||||
if (getRoleResult.IsError)
|
||||
return getRoleResult.Errors;
|
||||
|
||||
Reference in new issue
Block a user