Skip to content

shihab-geo/role-based-access-control

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.7%
  • HTML 7.1%
  • CSS 2.2%