Method ExplainUserGrantAsync
- Namespace
- MailFathom.Application.Access.Grants
- Assembly
- MailFathom.Application.dll
ExplainUserGrantAsync(UserId, CancellationToken)
Explains why one user holds each permission they hold within the caller's scope, and what each of their credentials keeps of it.
public Task<UserGrantExplanation?> ExplainUserGrantAsync(UserId user, CancellationToken cancellationToken)
Parameters
userUserIdThe user.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<UserGrantExplanation>
The explanation, or null where no such user exists within the caller's scope.
Remarks
The rows are read within the reach ReadAssignmentsAsync(AdministrativeListingQuery, CancellationToken) lists within, so covering the user is not enough to read what they hold through a group or at a scope the caller does not cover, and at most MaximumSources of them are answered, with the rest reported as left out.
Exceptions
- ArgumentException
Thrown when
usernames nobody.- PrincipalNotAuthorizedException
Thrown when the caller holds AdminRead at no scope.