This repository was archived by the owner on Dec 14, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import CDFManageUsers from '@/users/cdf-manage';
18
18
import ManageRequestToJoin from '@/dojos/manage-request-to-join' ;
19
19
import loggedInNavGuard from './loggedInNavGuard' ;
20
20
import loggedInCDFNavGuard from './loggedInCDFNavGuard' ;
21
+ import profileAuthRedirect from './profileAuthRedirect' ;
21
22
import orderExistsNavGuard from './orderExistsNavGuard' ;
22
23
import ticketingAdminNavGuard from './ticketingAdminNavGuard' ;
23
24
@@ -108,6 +109,7 @@ const router = new Router({
108
109
path : '/login' ,
109
110
name : 'Login' ,
110
111
component : Login ,
112
+ beforeEnter : profileAuthRedirect ,
111
113
} ,
112
114
{
113
115
path : '/home' ,
Original file line number Diff line number Diff line change
1
+ export default function ( to , from , next ) {
2
+ const profileAuthFlag = window . localStorage . getItem ( 'profileAuth' ) ;
3
+
4
+ if ( profileAuthFlag === 'true' ) {
5
+ const profileAuthPath = '/rpi/login' ;
6
+ const params = new URLSearchParams ( ) ;
7
+ params . append ( 'origin' , window . location . pathname ) ;
8
+ params . append ( 'redirect' , to . fullPath ) ;
9
+ window . location . href = `${ profileAuthPath } ?${ params } ` ;
10
+ } else {
11
+ next ( ) ;
12
+ }
13
+ }
You can’t perform that action at this time.
0 commit comments