Method PermitsOverAsync
- Namespace
- MailFathom.Application.Access
- Assembly
- MailFathom.Application.dll
PermitsOverAsync(MailFathomPermission, MailAccountId, CancellationToken)
Answers whether the caller holds one named capability over one mail account, for a boundary that has to decide rather than refuse.
public Task<bool> PermitsOverAsync(MailFathomPermission permission, MailAccountId account, CancellationToken cancellationToken)
Parameters
permissionMailFathomPermissionThe capability being asked about.
accountMailAccountIdThe account the operation names.
cancellationTokenCancellationTokenCancels placing the account.
Returns
Remarks
A boundary asks this before it answers anything else about the account, so that an account outside the caller's scope is told apart from one the deployment does not hold by nothing at all — ADR 0012 answers the one exactly as the other, because a refusal naming the scope would tell an organization's administrator the account exists.
PermitsOverAsync(MailFathomPermission, UserId, CancellationToken)
Answers whether the caller holds one named capability over one user, for a boundary that has to decide rather than refuse.
public Task<bool> PermitsOverAsync(MailFathomPermission permission, UserId user, CancellationToken cancellationToken)
Parameters
permissionMailFathomPermissionThe capability being asked about.
userUserIdThe user the operation names.
cancellationTokenCancellationTokenCancels placing the user.