mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 12:11:10 +00:00
Adds client side dialogs
This commit is contained in:
1 parent
b2acd9653b
commit
891aeb3281
46 files changed
+1013
-21
No files matched your search
+2
-1
@@ -62,7 +62,8 @@ public class DeleteRoleCommandHandler : IRequestHandler<DeleteRoleCommand, Error
|
||||
return getExistingRoleResult.Errors;
|
||||
else if (getExistingRoleResult.Value is null)
|
||||
return Errors.Authorization.RoleNotFound;
|
||||
|
||||
else if (getExistingRoleResult.Value.RoleName == "Admin")
|
||||
return Errors.Authorization.AdminRoleCannotBeDeleted;
|
||||
// delete the role and its permissions
|
||||
ErrorOr<Deleted> deleteRoleResult = await roleRepository.DeleteByIdAsync(request.RoleId, cancellationToken).ConfigureAwait(false);
|
||||
if (deleteRoleResult.IsError)
|
||||
|
||||
Reference in new issue
Block a user