Class ScopeRegistry
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
Methods
GetEffectiveScopes(AccessLevel, IEnumerable<string>, IEnumerable<string>)
public IReadOnlyList<string> GetEffectiveScopes(AccessLevel accessLevel, IEnumerable<string> roleNames, IEnumerable<string> scopeOverrides = null)
Parameters
accessLevelAccessLevelroleNamesIEnumerable<string>scopeOverridesIEnumerable<string>
Returns
GetScopesForAccessLevel(AccessLevel)
public IReadOnlyList<string> GetScopesForAccessLevel(AccessLevel accessLevel)
Parameters
accessLevelAccessLevel
Returns
Register(string, AccessLevel, string)
public void Register(string scopeName, AccessLevel defaultMinimumLevel, string description = null)
Parameters
scopeNamestringdefaultMinimumLevelAccessLeveldescriptionstring
SetRoleRegistry(ITenantRoleRegistry)
public void SetRoleRegistry(ITenantRoleRegistry roleRegistry)
Parameters
roleRegistryITenantRoleRegistry