Method RemoveGroupMemberAsync
- Namespace
- MailFathom.Application.Access.Grants
- Assembly
- MailFathom.Application.dll
RemoveGroupMemberAsync(Guid, UserId, CancellationToken)
Ends a user's membership of a group, which takes every assignment the group holds away from them.
public Task<GrantWriteResult> RemoveGroupMemberAsync(Guid groupId, UserId user, CancellationToken cancellationToken)
Parameters
groupIdGuidThe group.
userUserIdThe user leaving it.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<GrantWriteResult>
What the act did, Unchanged for somebody who was not a member, refused as LastRoot when it would take the last root away; UnknownGroup and UnknownUser also for a group or a user outside the caller's scope.
Exceptions
- ArgumentException
Thrown when
usernames nobody.- PrincipalNotAuthorizedException
Thrown when the caller holds AdminRolesWrite at no scope.