From 65b8468074733c9bb5d32e49c1f76b0e9ef2caa8 Mon Sep 17 00:00:00 2001 From: Jaimyn Mayer Date: Tue, 26 Sep 2023 15:23:21 +1000 Subject: [PATCH] fix webcams routeguard config --- src-frontend/src/boot/routeGuards.ts | 4 +++- src-frontend/src/pages/pageAndRouteConfig.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src-frontend/src/boot/routeGuards.ts b/src-frontend/src/boot/routeGuards.ts index 61c208ca..f1765a16 100644 --- a/src-frontend/src/boot/routeGuards.ts +++ b/src-frontend/src/boot/routeGuards.ts @@ -14,6 +14,7 @@ export default boot(({ router, store }) => { if ( store.getters['profile/profile']?.memberStatus === 'Needs Induction' && to.name !== 'membershipPlan' && + to.name !== 'webcams' && store.getters['config/features']?.enableMembershipPayments && to.meta.admin !== true ) { @@ -25,7 +26,7 @@ export default boot(({ router, store }) => { } // Check if the user must be logged in to access the route - if (to.meta.loggedIn === true) { + if (to.meta.loggedIn === true && to.name !== 'webcams') { if (store.getters['profile/loggedIn'] === true) return next(); else { return next({ @@ -49,6 +50,7 @@ export default boot(({ router, store }) => { // check if the user must be a member if ( to.meta.memberOnly && + to.name !== 'webcams' && store.getters['profile/profile'].memberStatus !== 'Active' ) return next({ name: 'Error403MemberOnly' }); diff --git a/src-frontend/src/pages/pageAndRouteConfig.ts b/src-frontend/src/pages/pageAndRouteConfig.ts index e4d8e1b7..65ccbd15 100644 --- a/src-frontend/src/pages/pageAndRouteConfig.ts +++ b/src-frontend/src/pages/pageAndRouteConfig.ts @@ -51,7 +51,7 @@ const PageAndRouteConfig: PageAndRouteConfigType[] = [ icon: icons.webcams, to: '/webcams', name: 'webcams', - loggedIn: false, + loggedIn: true, kiosk: true, featureEnabledFlag: 'enableWebcams', component: () => import('pages/Webcams.vue'),