Table of Contents

Method RecordOnceAsync

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

RecordOnceAsync(UserId, Guid, DateTimeOffset, CancellationToken)

Records the default administrator unless this deployment ever recorded one, and reports the administrator it holds.

Task<DefaultAdministratorRecord> RecordOnceAsync(UserId candidate, Guid assignmentId, DateTimeOffset recordedAt, CancellationToken cancellationToken)

Parameters

candidate UserId

The identifier the administrator is recorded under where this call is the one that records it.

assignmentId Guid

The identifier of the assignment giving it the seeded administrator role at the deployment scope.

recordedAt DateTimeOffset

When the record is written.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<DefaultAdministratorRecord>

What the deployment holds afterwards: the administrator, or none where it was recorded once and removed since.

Remarks

The user, its endpoint switches turned off, the assignment, and the record that all three were written commit together, so no start can leave a deployment holding the record without the user or the user without its grant.