From 9090dfd62c65ce7b3f39b5d8498003842a1240df Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Tue, 27 Aug 2024 21:49:26 -0700 Subject: [PATCH] Better blocking of no auth --- src/web/src/modules/administration/router/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/web/src/modules/administration/router/index.ts b/src/web/src/modules/administration/router/index.ts index 389a184..5b816b4 100644 --- a/src/web/src/modules/administration/router/index.ts +++ b/src/web/src/modules/administration/router/index.ts @@ -81,6 +81,8 @@ async function requireAccess(to: RouteLocation): Promise { 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;