/role-based-access-control

Role-based authorization || Role-based access-control in React.js

Primary LanguageJavaScript

Links

Demo App
Medium Story Version-2

Description

The idea is, simply prevent the app to generate unnecessary routes, rather checking current user role on each route it is great to generate only the routes that user have access.

Benefits

  • Check route access only once when parent route renders
  • Generate only routes that user have access
  • Central roles and private routes configuration file
  • Easy to add/remove a role
  • Easy to add/remove route access from user role
  • Synchronization between routes and navigation
  • Single + Multiple role support

TODO

  • Design same approach for components