WizelineLabs / access-decision-manager

access-decision-manager
MIT License
6 stars 2 forks source link

WIP - Add react package #55

Open AlfredoGJ opened 2 years ago

AlfredoGJ commented 2 years ago

What does this PR do?

Address #28

Provides an access-decision-manager binding for react with the next modules

<AccessDecisionManagerProvider user={} voters={}> component - Provides a component that binds the accessDecisionManager functioality with their respective arguments {user, voters, context?

useIsGranted() - hook- This hooks must be used in components that are under the AccessDecisionManagerProvider component to be able to use the voters and user

Why is this important?

Where should the reviewer start?

How should this be manually tested?

  1. Clone the repo
  2. Go to /packages/access-decision-manager-react/
  3. run npm install
  4. run npx jest --verbose all test should pass

Pending work

Type of change

Checklist