Table of Contents

Class AdministrativeTarget

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

Where one thing an administrative operation names sits in the deployment: the organization it belongs to, and the one user it is wholly theirs.

public sealed record AdministrativeTarget : IEquatable<AdministrativeTarget>
Inheritance
AdministrativeTarget
Implements
Inherited Members

Remarks

A scope covers a target by one of those two facts or by being the deployment, and by nothing else: an organization covers what belongs to it, and a user scope covers what is that user's alone. A user is wholly their own; a mail account is one user's only while it is assigned to nobody else, because a mailbox assigned to two people is read by both and what reaches mail another person reads is not one user's to do.

A mail account in no organization is covered by the deployment scope alone, whoever it is assigned to, while a user in none is covered by the deployment and by a scope naming them. Something in no organization and nobody's alone is what a target the deployment does not hold resolves to — so a target nobody can place is reached by nothing narrower than the deployment, and a lookup that found nothing never widens what a scope covers.

Properties

Organization

Gets the organization the target belongs to, or null for none.

SoleUser

Gets the one user the target is wholly the concern of, or null where it is nobody's alone.

Unplaced

Gets the target in no organization and nobody's alone, which the deployment scope alone covers.

Methods

IsCoveredBy(AssignmentScope)

Reports whether one scope covers this target.

MailAccount(Guid?, IReadOnlyCollection<UserId>)

Places a mail account.

OrganizationItself(Guid)

Places an organization itself, for an operation that names one rather than something inside it.

User(UserId, Guid?)

Places a user.