Next.js Discord

Discord Forum

multi role access control

Unanswered
TyZreX posted this in #help-forum
Open in Discord
Need help to know the best possible way to do this

6 Replies

I already have a super user setup with all the components and need to implement another role moderator which has a subset of the features of the super admin
The components will be reused
What's the best way to go by this for proper authorization
Checking the role in each page is the way to go or is there any other approaches for this can anyone help me
@TyZreX Need help to know the best possible way to do this
I like to use this package: https://www.npmjs.com/package/easy-rbac
For role based access controll. It's pretty easy: your user sign in, the groups/roles are set in his session and then you can easily pass it to the functions of rbac 👍
@TyZreX solved?