Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorize routes using user role in NextJS middleware #129

Open
harryrigg opened this issue Nov 5, 2024 · 0 comments
Open

Authorize routes using user role in NextJS middleware #129

harryrigg opened this issue Nov 5, 2024 · 0 comments
Labels
difficulty:easy frontend Task must have a front end issue

Comments

@harryrigg
Copy link
Collaborator

Pending the completion of Issue #128.

Currently, the NextJS middleware only distinguishes between public and non-public routes when determining authorization. This means that an attendee can access the create and edit event pages (even though they won't be able to submit the form).

A list should be created in the middleware file that defines all the routes accessible by poster only. Then, using the value set in the user_role cookie, access should be determined accordingly.

@harryrigg harryrigg added frontend Task must have a front end issue difficulty:easy labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy frontend Task must have a front end issue
Projects
None yet
Development

No branches or pull requests

1 participant