useVexPermissions
useVexPermissions():
object
Defined in: packages/react/src/access/useVexPermissions.ts:16
S5 context hook — binds hasPermission to the current user, for a slot contribution’s
access predicate (SlotAccessContext) and for a project’s own slot components that need the
same check. Thin wrapper over useVexAccess/useVexAuth, which already carry the resolved
access config and current user respectively.
Experimental: breaking changes are still possible before this stabilizes.
Returns
Section titled “Returns”object
An object exposing hasPermission(resource, action) bound to the current user.
hasPermission
Section titled “hasPermission”hasPermission: (
resource,action) =>boolean
Parameters
Section titled “Parameters”resource
Section titled “resource”string
action
Section titled “action”string
Returns
Section titled “Returns”boolean