Skip to main content
zerotal

Documentation


Documentation / @zerotal/admin / index / roleHas

Function: roleHas()

roleHas(role, held, key): boolean

Defined in: admin/src/roles.ts:173

Whether a role holds a permission.

A superuser holds everything by definition, which is what keeps the matrix honest about what such a role can actually do.

Parameters

role

Role

held

string[]

key

string

Returns

boolean