Method PermitsOverScopeAsync
- Namespace
- MailFathom.Application.Access
- Assembly
- MailFathom.Application.dll
PermitsOverScopeAsync(MailFathomPermission, AssignmentScope, CancellationToken)
Answers whether the caller holds one named capability at a scope covering everything another scope covers.
public Task<bool> PermitsOverScopeAsync(MailFathomPermission permission, AssignmentScope scope, CancellationToken cancellationToken)
Parameters
permissionMailFathomPermissionThe capability being asked about.
scopeAssignmentScopeThe scope an operation is bounded by: the deployment, an organization it names, or a user.
cancellationTokenCancellationTokenCancels placing the user a user scope names.
Returns
- Task<bool>
true when an admitted caller holds the capability over the deployment, over the organization the scope names or the user it names belongs to, or over that same user.
Remarks
This is how an operation naming an organization is asked, and how one grant is held against another: whoever places a credential for a user holds each name that user holds at a scope covering the one the user holds it at, and a scope is covered exactly where the thing it names is.
Exceptions
- ArgumentNullException
Thrown when
scopeis null.