Skip to content

Add protected routes and support additional roles

This is work going towards building the admin page.

It adds:

  • ProtectedRoute component, which handles authentication and authorization
  • Adds admin role support
  • useAuth hook, I am thinking this will be temporarily used until we update how user state is managed (PortalContext is simply too huge at the moment).
  • An error 401 page
  • Jest support (tests weren't working before)
Edited by Olivier Goulet

Merge request reports