Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Releases: julio-cavallari/react-hook-use-permissions

Release

15 Feb 00:08
d16c1e6
Compare
Choose a tag to compare

v2.0.0

General

Better Typescript integration

Hooks

Refactor: Change function returns to use array built in - thanks to @luisrabock for that refactor

Permission Component

Made it more user-friendly, now you only have to pass redux selector or permissions array and pass the permissions that you want to verify to the props with the same name of the methods that are available in hooks, like hasAny="create".

Release

31 Dec 17:05
Compare
Choose a tag to compare

v1.0.6

usePermissions Hook

4 methods to verifiy if the user have or doesn't have permission

  • hasAny;
  • hasAll;
  • doesNotHaveAny;
  • doesNotHaveAll;

Permission Component

Component that use the usePermissions hook by itself, and render the children if the user has permission