Method RenameRoleAsync
- Namespace
- MailFathom.Application.Access.Grants
- Assembly
- MailFathom.Application.dll
RenameRoleAsync(Guid, string?, CancellationToken)
Replaces the name an operator reads a role by.
public Task<GrantWriteResult> RenameRoleAsync(Guid roleId, string? name, CancellationToken cancellationToken)
Parameters
roleIdGuidThe role.
namestringThe new name.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<GrantWriteResult>
What the act did.
Exceptions
- ArgumentException
Thrown when
namebreaks FindNameRefusal(string?).- PrincipalNotAuthorizedException
Thrown when the caller does not hold AdminRolesWrite over the deployment.