Table of Contents

Class ScopeRegistry

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Stores scope definitions and resolves effective scopes for a given access level. Owner and Administrator get all registered scopes. User gets scopes registered at User or Viewer level. Viewer gets only scopes registered at Viewer level. Custom gets no base scopes at all (exempt from the Owner/Administrator all-scopes rule); its effective scopes come solely from roles and scope overrides. Role scopes are unioned with access level scopes.

public class ScopeRegistry : IScopeRegistry
Inheritance
ScopeRegistry
Implements
Inherited Members

Properties

All

public IReadOnlyList<ScopeDefinition> All { get; }

Property Value

IReadOnlyList<ScopeDefinition>

Methods

GetEffectiveScopes(AccessLevel, IEnumerable<string>, IEnumerable<string>)

public IReadOnlyList<string> GetEffectiveScopes(AccessLevel accessLevel, IEnumerable<string> roleNames, IEnumerable<string> scopeOverrides = null)

Parameters

accessLevel AccessLevel
roleNames IEnumerable<string>
scopeOverrides IEnumerable<string>

Returns

IReadOnlyList<string>

GetScopesForAccessLevel(AccessLevel)

public IReadOnlyList<string> GetScopesForAccessLevel(AccessLevel accessLevel)

Parameters

accessLevel AccessLevel

Returns

IReadOnlyList<string>

Register(string, AccessLevel, string)

public void Register(string scopeName, AccessLevel defaultMinimumLevel, string description = null)

Parameters

scopeName string
defaultMinimumLevel AccessLevel
description string

SetRoleRegistry(ITenantRoleRegistry)

public void SetRoleRegistry(ITenantRoleRegistry roleRegistry)

Parameters

roleRegistry ITenantRoleRegistry