Class ScopedGrant
- Namespace
- MailFathom.Domain.Access
- Assembly
- MailFathom.Domain.dll
What a principal holds: every permission it was granted, each paired with the scopes it is held at.
public sealed class ScopedGrant
- Inheritance
-
ScopedGrant
- Inherited Members
Remarks
A user's grant is the union of what their own assignments and their groups' assignments give, each assignment contributing every name of its role at its scope, so one permission may be held at several scopes and is held at each of them. There is no deny: nothing here subtracts a scope, and the only way a grant gets smaller is NarrowedTo(IEnumerable<MailFathomPermission>), which keeps names and never touches the scope a name is held at.
The scope is read by administrative permissions alone. A mail permission reaches its holder's own mail whatever scope the assignment granting it names, so a mail use case asks Permissions and an administrative one asks ScopesOf(MailFathomPermission) as well.
Properties
- None
Gets the grant holding nothing.
- Permissions
Gets every permission held, at whichever scope.
Methods
- AtDeployment(IEnumerable<MailFathomPermission>)
Builds a grant holding every one of some permissions over the whole deployment.
- Covers(MailFathomPermission, AdministrativeTarget)
Reports whether one permission is held at a scope covering a target.
- NarrowedTo(IEnumerable<MailFathomPermission>)
Keeps only the permissions a narrowing names, each at every scope it was held at.
- Of(IEnumerable<(MailFathomPermission Permission, AssignmentScope Scope)>)
Builds the union of what several assignments give.
- ScopesOf(MailFathomPermission)
Reports the scopes one permission is held at.