Table of Contents

Method CallerActingFor

Namespace
MailFathom.Application.Access
Assembly
MailFathom.Application.dll

CallerActingFor(UserId, string, IEnumerable<MailFathomPermission>)

Describes a caller the transport admitted that acts for one user's mail.

public static AuthorizedPrincipal CallerActingFor(UserId user, string identity, IEnumerable<MailFathomPermission> grantedPermissions)

Parameters

user UserId

The user whose mail the caller was admitted to act on.

identity string

What the transport admitted the caller as, in the forms Identity describes.

grantedPermissions IEnumerable<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 caller every mail-reading surface admits. The user is decided by whatever admitted the caller and is carried rather than chosen, so no argument of any tool can move it: a request cannot name a user, and a grant however broad cannot widen the mail it reaches beyond that user's own.

Exceptions

ArgumentNullException

Thrown when identity or grantedPermissions is null.

ArgumentException

Thrown when identity is empty or white space, or when user names nobody.

CallerActingFor(UserId, string, ScopedGrant)

Describes a caller the transport admitted that acts for one user's mail, holding each permission at the scopes it was granted at.

public static AuthorizedPrincipal CallerActingFor(UserId user, string identity, ScopedGrant grant)

Parameters

user UserId

The user whose mail the caller was admitted to act on.

identity string

What the transport admitted the caller as, in the forms Identity describes.

grant ScopedGrant

What the caller holds: the user's grant, narrowed by whatever admitted the caller.

Returns

AuthorizedPrincipal

The principal the use cases the caller reaches are consulted with.

Exceptions

ArgumentNullException

Thrown when identity or grant is null.

ArgumentException

Thrown when identity is empty or white space, or when user names nobody.