Table of Contents

Class SystemRoleRegistry

Namespace
Tharga.Team
Assembly
Tharga.Team.dll

Maps app/global role names to system scopes. Role names are matched case-insensitively.

public class SystemRoleRegistry : ISystemRoleRegistry
Inheritance
SystemRoleRegistry
Implements
Inherited Members

Properties

All

public IReadOnlyDictionary<string, string[]> All { get; }

Property Value

IReadOnlyDictionary<string, string[]>

Methods

GetScopesForRoles(IEnumerable<string>)

Returns the distinct system scopes granted by the given role names.

public IReadOnlyList<string> GetScopesForRoles(IEnumerable<string> roleNames)

Parameters

roleNames IEnumerable<string>

Returns

IReadOnlyList<string>

Grant(string, params string[])

Grants additional system scopes to a role, merging with any existing mapping. Unlike Map(string, params string[]) this never throws on an already-mapped role, so toolkit-side grants can compose on top of consumer configuration. Map(string, params string[]) stays strict, so a duplicate mapping in consumer configuration is still reported as the mistake it is.

public void Grant(string roleName, params string[] systemScopes)

Parameters

roleName string
systemScopes string[]

Map(string, params string[])

public void Map(string roleName, params string[] systemScopes)

Parameters

roleName string
systemScopes string[]