Table of Contents

Method FindGrantRefusal

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

FindGrantRefusal(IReadOnlyList<MailFathomPermission>?)

Reports why a written narrowing cannot be kept by a user-facing credential, or that it can.

public static string? FindGrantRefusal(IReadOnlyList<MailFathomPermission>? permissions)

Parameters

permissions IReadOnlyList<MailFathomPermission>

The permissions the request named, or null where it named none.

Returns

string

The sentence naming what to write instead, or null when the narrowing is one this deployment accepts.

Remarks

Published here rather than at each boundary, so an operator provisioning over HTTP and one provisioning from a terminal are refused in one sentence. An unstated narrowing is not a refusal: it names nothing and holds what the user's roles grant, and an empty list is the opposite statement — a credential that authenticates and may do nothing. A name the user does not hold is accepted, because the user's grant moves while the credential's list does not. Names of both halves are accepted, because each surface reads the half it guards: an administrative name narrows what the credential may do on the administrative endpoint and a mail name what it may do on the other two.