Table of Contents

Interface ITeam

Namespace
Tharga.Team
Assembly
Tharga.Team.dll
public interface ITeam

Properties

AccessRequests

Requests for access to this team: every pending one, and the most recent decided ones.

IReadOnlyList<TeamAccessRequest> AccessRequests { get; }

Property Value

IReadOnlyList<TeamAccessRequest>

ConsentAccessLevel

Access level granted to consented roles. Null falls back to the configured default consent level.

AccessLevel? ConsentAccessLevel { get; }

Property Value

AccessLevel?

ConsentedRoles

Global roles that have been granted access to this team via consent. Null or empty means no consent granted.

string[] ConsentedRoles { get; }

Property Value

string[]

CustomRoles

Custom roles defined at runtime for this team (created / updated / deleted without a code deploy). Null or empty means only code-registered roles apply. Each role's scopes are constrained to app-registered scopes.

IReadOnlyList<TenantRoleDefinition> CustomRoles { get; }

Property Value

IReadOnlyList<TenantRoleDefinition>

DeletedAt

When the team was soft-deleted, or null while it is live.

DateTime? DeletedAt { get; }

Property Value

DateTime?

Remarks

A default interface member, so a host implementing ITeam directly keeps compiling — the same reason ConsentedRoles is one.

A soft-deleted team is excluded from every read and grants no access; it exists so a deletion can be undone, and so its storage can be dropped later as a separate, more privileged act.

DeletedBy

Identity of whoever soft-deleted the team, or null while it is live.

string DeletedBy { get; }

Property Value

string

Icon

string Icon { get; }

Property Value

string

IsDeleted

Whether the team is soft-deleted.

bool IsDeleted { get; }

Property Value

bool

Remarks

Derived from DeletedAt rather than stored beside it. Two fields that must agree eventually disagree — a restore that clears one and not the other leaves a team that is deleted by one reading and live by the other, and every read path then depends on which it happened to consult. One value, one answer.

Key

string Key { get; }

Property Value

string

Name

string Name { get; }

Property Value

string

TemporaryConsent

Set while the consent above is temporary — granted by an approved access request and due to return to the previous consent. Null when the consent is standing.

TemporaryConsent TemporaryConsent { get; }

Property Value

TemporaryConsent

Remarks

Read consent through Resolve(ITeam, DateTime), never from ConsentedRoles and ConsentAccessLevel directly — those still hold the temporary consent after it has run out.