Table of Contents

Method AddGroupMemberAsync

Namespace
MailFathom.Application.Access.Grants
Assembly
MailFathom.Application.dll

AddGroupMemberAsync(Guid, UserId, CancellationToken)

Makes a user a member of a group, which gives them every assignment the group holds.

public Task<GrantWriteResult> AddGroupMemberAsync(Guid groupId, UserId user, CancellationToken cancellationToken)

Parameters

groupId Guid

The group.

user UserId

The user joining it.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<GrantWriteResult>

What the act did, Unchanged for somebody who was already a member; UnknownGroup and UnknownUser also for a group or a user outside the caller's scope.

Exceptions

ArgumentException

Thrown when user names nobody.

PrincipalNotAuthorizedException

Thrown when the caller holds AdminRolesWrite at no scope, does not hold a name the group's assignments give at a scope covering where they give it, or is not the root while one of those assignments gives a role listing a pattern.