Table of Contents

Class TenantRoleServiceCollectionExtensions

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Extension methods for registering tenant roles.

public static class TenantRoleServiceCollectionExtensions
Inheritance
TenantRoleServiceCollectionExtensions
Inherited Members

Methods

AddThargaDynamicTenantRoles(IServiceCollection, Action<DynamicTenantRoleOptions>)

Registers the team-aware ITenantRoleService that resolves a member's effective scopes from code-registered roles plus the team's runtime-defined custom roles. Enables dynamic tenant roles: without it, only code-registered roles are resolved into claims.

public static IServiceCollection AddThargaDynamicTenantRoles(this IServiceCollection services, Action<DynamicTenantRoleOptions> configure = null)

Parameters

services IServiceCollection

The service collection.

configure Action<DynamicTenantRoleOptions>

Optional configuration for dynamic roles, e.g. o => o.ManageScope = "access:manage" to gate custom-role CRUD under a scope other than the default team:manage.

Returns

IServiceCollection

AddThargaTenantRoles(IServiceCollection, Action<TenantRoleRegistry>)

Registers the tenant role registry and configures roles. Links to the scope registry so effective scopes include role scopes.

public static IServiceCollection AddThargaTenantRoles(this IServiceCollection services, Action<TenantRoleRegistry> configure)

Parameters

services IServiceCollection
configure Action<TenantRoleRegistry>

Returns

IServiceCollection