Interface ITenantRoleService
- Namespace
- Tharga.Team
- Assembly
- Tharga.Team.dll
Team-aware view over tenant roles: composes the global code-registered roles (ITenantRoleRegistry) with a team's runtime-defined custom roles, and resolves the effective scopes for a member of a specific team. This is the resolution path that lets a member assigned a custom role receive that role's scopes — the team-blind ITenantRoleRegistry only knows code roles.
public interface ITenantRoleService
Methods
GetEffectiveScopesAsync(string, AccessLevel?, IEnumerable<string>, IEnumerable<string>)
Effective scopes for a member of the given team: access-level scopes ∪ code-role scopes ∪ custom-role scopes (for the role names the member holds) ∪ explicit scope overrides. Empty for a null level, roles and overrides included, as GetEffectiveScopes(AccessLevel?, IEnumerable<string>, IEnumerable<string>).
Task<IReadOnlyList<string>> GetEffectiveScopesAsync(string teamKey, AccessLevel? accessLevel, IEnumerable<string> roleNames, IEnumerable<string> scopeOverrides = null)
Parameters
teamKeystringaccessLevelAccessLevel?roleNamesIEnumerable<string>scopeOverridesIEnumerable<string>
Returns
GetRolesAsync(string)
All roles applicable to the given team: code-registered roles plus the team's custom roles. Code roles take precedence on a name clash.
Task<IReadOnlyList<TenantRoleDefinition>> GetRolesAsync(string teamKey)
Parameters
teamKeystring