UnconditionedLife / smum

SMUM Checkin for Santa Maria Urban Ministries (San Jose, California)
https://www.santamariasj.org
3 stars 0 forks source link

Admin pages cannot be refreshed #152

Closed scott-r closed 6 months ago

scott-r commented 7 months ago

When an admin page is reloaded, the URL is rewritten to /clients, taking you back to the start page. URL-based navigation needs to work consistently for all pages in the app.

UnconditionedLife commented 7 months ago

This turned out to be a simple fix. The isAdmin function (checks if the user is an ADMIN) was checking before the session was available and returning FALSE. I made the function return "undefined" if the session is not yet available, and the header router now ignores undefined.