basalt / permissions/src / permissionMatches
Function: permissionMatches()
> permissionMatches(granted, requested): boolean
Defined in: permissions/src/match.ts:30
'projects:*' grants 'projects:delete'; '*' grants everything.
A permission with an empty segment ('', 'projects:', ':read', 'a::b') is malformed and never matches anything — not even itself, and not a wildcard: 'projects:*' does not grant 'projects:', and '*' does not grant ''.
Parameters
granted
string
requested
string
Returns
boolean