Skip to content

umair-khanzada/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