Permission Hooks
Permission and access control hooks
Hooks for checking permissions and managing access control.
Package
@tetherto/mdk-react-adapter
Hooks
useCheckPerm
Hook to check if the current user has a specific permission. Reads permissions from the headless authStore via @tetherto/mdk-react-adapter.
({ perm, write, cap }: PermissionCheck) => booleanuseHasPerms
Hook returning a permission-check callback bound to the current authStore.permissions.
() => ((req: PermissionRequest) => boolean)useIsFeatureEditingEnabled
Hook to check if the current user has the capability to edit feature flags.
() => boolean