Method Caller
- Namespace
- MailFathom.Application.Access
- Assembly
- MailFathom.Application.dll
Caller(string, IEnumerable<MailFathomPermission>)
Describes a caller the transport admitted that acts for no user's mail.
public static AuthorizedPrincipal Caller(string identity, IEnumerable<MailFathomPermission> grantedPermissions)
Parameters
identitystringWhat the transport admitted the caller as, in the forms Identity describes.
grantedPermissionsIEnumerable<MailFathomPermission>The permissions the entry that admitted it resolved to, empty when it granted none.
Returns
- AuthorizedPrincipal
The principal the use cases the caller reaches are consulted with.
Remarks
This is the deployment administrator: a caller whose acts are the deployment's own rather than one person's mail. Every use case that reads or writes mail on somebody's behalf refuses it, so the administrative surface cannot become a way to read a mailbox by holding an administrative grant.
An unspecified permission is dropped rather than carried, because the struct default names no capability and holding one would mean holding nothing under a name that reads like something.
Exceptions
- ArgumentNullException
Thrown when
identityorgrantedPermissionsis null.- ArgumentException
Thrown when
identityis empty or white space, which would leave a principal nothing can be reported by.
Caller(string, ScopedGrant)
Describes a caller the transport admitted that acts for no user's mail, holding each permission at the scopes it was granted at.
public static AuthorizedPrincipal Caller(string identity, ScopedGrant grant)
Parameters
identitystringWhat the transport admitted the caller as, in the forms Identity describes.
grantScopedGrantWhat the caller holds, each permission with the scopes it is held at.
Returns
- AuthorizedPrincipal
The principal the use cases the caller reaches are consulted with.
Exceptions
- ArgumentNullException
Thrown when
identityorgrantis null.- ArgumentException
Thrown when
identityis empty or white space.