Table of Contents

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

permission MailFathomPermission

The capability being asked about.

account MailAccountId

The account the operation names.

cancellationToken CancellationToken

Cancels placing the account.

Returns

Task<bool>

true when an admitted caller holds the capability at a scope covering the account.

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

permission MailFathomPermission

The capability being asked about.

user UserId

The user the operation names.

cancellationToken CancellationToken

Cancels placing the user.

Returns

Task<bool>

true when an admitted caller holds the capability at a scope covering the user.