Don't use hep logout in tests

This commit is contained in:
Christian Cueni 2021-07-21 08:53:04 +02:00
parent 042e21cfd6
commit b5de0b582c
1 changed files with 6 additions and 2 deletions

View File

@ -153,8 +153,12 @@ function joiningClass(to) {
router.beforeEach(async (to, from, next) => {
if (to.path === '/logout') {
publicApolloClient.resetStore();
location.replace(`https://sso.hep-verlag.ch/logout?return_to=${process.env.LOGOUT_REDIRECT_URL}`);
next(false);
if (process.env.LOGOUT_REDIRECT_URL) {
location.replace(`https://sso.hep-verlag.ch/logout?return_to=${process.env.LOGOUT_REDIRECT_URL}`);
next(false);
} else {
next({name: 'hello'});
}
}
if (unauthorizedAccess(to)) {