Class ConsentInForce
- Namespace
- Tharga.Team
- Assembly
- Tharga.Team.dll
The consent a team has in force at a moment.
public sealed record ConsentInForce : IEquatable<ConsentInForce>
- Inheritance
-
ConsentInForce
- Implements
- Inherited Members
Constructors
ConsentInForce(string[], AccessLevel?, DateTime?)
The consent a team has in force at a moment.
public ConsentInForce(string[] Roles, AccessLevel? AccessLevel, DateTime? ExpiresAt)
Parameters
Rolesstring[]The roles consented to. Never null; empty means no consent.
AccessLevelAccessLevel?The consented level, or null to fall back to the configured default.
ExpiresAtDateTime?When this consent runs out, or null when it is standing.
Properties
AccessLevel
The consented level, or null to fall back to the configured default.
public AccessLevel? AccessLevel { get; init; }
Property Value
ExpiresAt
When this consent runs out, or null when it is standing.
public DateTime? ExpiresAt { get; init; }
Property Value
HasConsent
Whether any role is consented to.
public bool HasConsent { get; }
Property Value
Roles
The roles consented to. Never null; empty means no consent.
public string[] Roles { get; init; }
Property Value
- string[]
Methods
Covers(IEnumerable<string>)
Whether a caller holding roles is covered by this consent.
public bool Covers(IEnumerable<string> roles)
Parameters
rolesIEnumerable<string>