Class ConsentOptions
Data-access consent options — controls cross-team access granted by a team to global roles.
public class ConsentOptions
- Inheritance
-
ConsentOptions
- Inherited Members
Remarks
In the core package, not the Blazor one, because consent is authorization rather than
presentation. It decides what a caller may do in a team they do not belong to, and every surface
that answers that question has to agree — the Blazor circuit, and an MCP call naming a team. It lived
under Tharga.Team.Blazor.Framework until the MCP surface needed it too and could not reach it,
which briefly left the same policy configured in two places.
Resolve it as IOptions<ConsentOptions>. A host that never configures it gets these
defaults, so a package used without the Blazor registration still behaves predictably.
Properties
AccessLevel
Default access level granted via team consent, used when the consent itself doesn't carry a level. Default Viewer.
public AccessLevel AccessLevel { get; set; }
Property Value
Default
Whether new teams start with consent enabled. Default true.
public bool Default { get; set; }
Property Value
GrantTeamsRead
Also grant the roles in Roles the Read system scope, so they can enumerate every team rather than only the ones they belong to. Default false.
public bool GrantTeamsRead { get; set; }
Property Value
Remarks
Off by default on purpose: Roles means "roles a team may grant access to", which is
a per-team inbound opt-in. Deriving a global enumeration privilege from it automatically would
silently widen access for existing hosts on upgrade. Opt in explicitly, or map the scope yourself
via ConfigureSystemRoles. Grants discovery only — access inside a team remains governed by
that team's consent.
Roles
Global roles that can be granted access to a team via consent. The consent toggle in TeamComponent offers these roles. Default ["Developer"].
public string[] Roles { get; set; }
Property Value
- string[]
ShowToggle
Show the consent toggle in TeamComponent for team administrators. Default false.
public bool ShowToggle { get; set; }