Table of Contents

Constructor GrantSource

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

GrantSource(MailFathomPermission, string?, Guid, string, Guid, Guid?, string?, AssignmentScope)

Why a user holds one permission at one scope: the role that lists it, the pattern it is listed through if it is not written out, the assignment that gives the role, and the group the assignment reaches them through, if any.

public GrantSource(MailFathomPermission Permission, string? Pattern, Guid RoleId, string RoleName, Guid AssignmentId, Guid? GroupId, string? GroupName, AssignmentScope Scope)

Parameters

Permission MailFathomPermission

The permission held.

Pattern string

The pattern on the role's list that reaches the permission, as written, or null where the role lists the permission by name.

RoleId Guid

The role listing it.

RoleName string

The name an operator reads the role by.

AssignmentId Guid

The assignment giving the role.

GroupId Guid?

The group the assignment names, or null where it names the user directly.

GroupName string

The name an operator reads that group by, or null where it names the user directly.

Scope AssignmentScope

The scope the assignment names, which is where the permission is held.

Remarks

One row of the answer ADR 0012 gives every grant: this role, directly or through this group, at this scope. Groups are not nested, so the row is the whole explanation rather than the first step of a path. A name nobody wrote out is traced to the entry that reaches it, so a role listing a permission by name and through a pattern as well explains it twice, once per entry, because removing either leaves the other granting it.