Skip to content

Commit

Permalink
Better blocking of no auth
Browse files Browse the repository at this point in the history
  • Loading branch information
datajohnson committed Aug 28, 2024
1 parent c5a4009 commit 9090dfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/web/src/modules/administration/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ async function requireAccess(to: RouteLocation): Promise<boolean | string> {

let user = await waitForUserToLoad();

if (!user) return "/NotAuthorized?Requires-User";

if (user.STATUS != "Active") return "/NotAuthorized?Requires-Active";

if (to.meta && to.meta.allow_admin && user.IS_ADMIN == "Y") return true;
Expand Down

0 comments on commit 9090dfd

Please sign in to comment.