Table of Contents

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

Roles string[]

The roles consented to. Never null; empty means no consent.

AccessLevel AccessLevel?

The consented level, or null to fall back to the configured default.

ExpiresAt DateTime?

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

AccessLevel?

ExpiresAt

When this consent runs out, or null when it is standing.

public DateTime? ExpiresAt { get; init; }

Property Value

DateTime?

HasConsent

Whether any role is consented to.

public bool HasConsent { get; }

Property Value

bool

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

roles IEnumerable<string>

Returns

bool