Skip to content

Conversation

amritkv
Copy link
Member

@amritkv amritkv commented Sep 26, 2025

Restricted the admin sub-page access to non admin user roles

Closes : #1038

Copy link
Contributor

@heliocastro heliocastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amritkv, is it not better to restrict pages by user groups?
This sound really flaky

@amritkv
Copy link
Member Author

amritkv commented Sep 29, 2025

@amritkv, is it not better to restrict pages by user groups? This sound really flaky

Hey @heliocastro, Yes, I do agree on this. Actually, I just extended the existing implementation that is to check for all /admin/* and not only /admin for the time being.
May be after our first release, we'll remove the regex-based matching completely.
What do you think ?

@heliocastro
Copy link
Contributor

@amritkv We need sit down on this one. The regex match is far from a good approach. Did you verified what is the solution using next-auth capabilities ?
We do have user authenticated, we can pass group on auth and some necessary info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(Admin): Restrict Admin section access to non admin role

2 participants