ByteSizedIT / reports-app

https://reports-app-ten.vercel.app
Other
0 stars 0 forks source link

Centralise authorisation #62

Closed ByteSizedIT closed 4 weeks ago

ByteSizedIT commented 1 month ago

Currently the app performs authorisation checks directly within multiple page components and server functions, by verifying user access to specific pages based on their organisation.

There is a lot of repeated/redundant code, prompting increased maintenance, complexity, and potential inconsistencies.

Proposal: Centralise authorisation logic by creating an authorisationService and using Next.js middleware to handle these auth checks globally.

Tasks:

Stetch: Implement Next.js Middleware