Method ReadGrantOfAsync
- Namespace
- MailFathom.Application.Access.Grants
- Assembly
- MailFathom.Application.dll
ReadGrantOfAsync(UserId, CancellationToken)
Reads what one user holds through every assignment naming them and every assignment naming a group they are a member of.
Task<ScopedGrant> ReadGrantOfAsync(UserId user, CancellationToken cancellationToken)
Parameters
userUserIdThe user.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<ScopedGrant>
Each permission those assignments' roles grant — listed by name or reached by a pattern — paired with the scope of the assignment that gave it; empty for a user assigned nothing, and for nobody at all.
Remarks
A stored entry that grants nothing in this build is granted to nobody, as Read(IEnumerable<string>) decides for every role.
Exceptions
- ArgumentException
Thrown when
usernames nobody.