Skip to content

TypeScript API / laikacms/auth / normalizeScopes

Function: normalizeScopes() ​

ts
function normalizeScopes(scopes): Scope[];

Canonicalize a scope set for storage: dedupe, and collapse a global grant (admin/*) to a single admin. Does not enumerate granular scopes (the vocabulary is open); wildcard semantics are resolved at check time by hasScope.

Parameters ​

ParameterType
scopesreadonly Scope[]

Returns ​

Scope[]

Released under the MIT License.