Table of Contents

Method NarrowedTo

Namespace
MailFathom.Domain.Access
Assembly
MailFathom.Domain.dll

NarrowedTo(IEnumerable<MailFathomPermission>)

Keeps only the permissions a narrowing names, each at every scope it was held at.

public ScopedGrant NarrowedTo(IEnumerable<MailFathomPermission> permissions)

Parameters

permissions IEnumerable<MailFathomPermission>

The names the narrowing keeps: a credential's list, a token's scopes, or a surface's half.

Returns

ScopedGrant

The narrowed grant.

Remarks

A narrowing names permissions and never scopes, because a second scoping rule beside the assignment would be a second rule every check has to keep consistent with the first. A name the narrowing lists and the grant does not hold grants nothing, so a narrowing can only take away.

Exceptions

ArgumentNullException

Thrown when permissions is null.