Class TenantRoleServiceCollectionExtensions
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
servicesIServiceCollectionThe service collection.
configureAction<DynamicTenantRoleOptions>Optional configuration for dynamic roles, e.g.
o => o.ManageScope = "access:manage"to gate custom-role CRUD under a scope other than the defaultteam:manage.
Returns
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
servicesIServiceCollectionconfigureAction<TenantRoleRegistry>