Table of Contents

Method AssignAsync

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

AssignAsync(Guid, Guid, AssignmentPrincipal, AssignmentScope, DateTimeOffset, CancellationToken)

Gives a role to a user or a group at a scope.

Task<GrantWriteResult> AssignAsync(Guid assignmentId, Guid roleId, AssignmentPrincipal principal, AssignmentScope scope, DateTimeOffset assignedAt, CancellationToken cancellationToken)

Parameters

assignmentId Guid

The identifier the assignment is to carry.

roleId Guid

The role.

principal AssignmentPrincipal

Who it is given to.

scope AssignmentScope

What it reaches.

assignedAt DateTimeOffset

When it was given.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<GrantWriteResult>

Written, AlreadyAssigned, or the outcome naming which of the role, the group, the user, or the organization does not exist.