codersforcauses / codersforcauses/coexist

Authorize routes using user role in NextJS middleware

Open
#129 0 comments 0 reactions 0 assignees View on GitHub
difficulty:easy frontend
Dominant language
TypeScript
Stars
7
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.