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
assignmentIdGuidThe identifier the assignment is to carry.
roleIdGuidThe role.
principalAssignmentPrincipalWho it is given to.
scopeAssignmentScopeWhat it reaches.
assignedAtDateTimeOffsetWhen it was given.
cancellationTokenCancellationTokenCancels 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.