Skip to content
Snippets Groups Projects
Commit 2251a259 authored by m431m's avatar m431m :speech_balloon:
Browse files

Merge branch 'redmine-issues/14331' into 'develop'

REDMINE_ISSUE-14331

See merge request onegeo-suite/sites/onegeo-suite-site-login-vuejs!37
parents 3cb87f11 9e2ab201
No related branches found
No related tags found
No related merge requests found
Pipeline #12645 passed
export default {
authorizedRedirections: [
'/',
'/onegeo-publish/fr/home/'
/^\/$/,
/^\/onegeo-publish/,
/^\/onegeo-login/,
/^\/portail/,
],
forms: {
signup: {
......
......@@ -39,7 +39,11 @@ const actions = {
response: response,
message: ''
});
if (this.$config.authorizedRedirections.includes(decodeURIComponent(router.currentRoute.query.next))) {
if (
this.$config.authorizedRedirections.some(reg => {
return reg.test(decodeURIComponent(router.currentRoute.query.next))
})
) {
window.location.href = router.currentRoute.query.next;
} else {
this.$router.push({ name: 'NotFound' });
......
......@@ -160,7 +160,11 @@ export default {
logged() {
if (this.logged && this.next) {
if (this.$config.authorizedRedirections.includes(decodeURIComponent(this.next))) {
if (
this.$config.authorizedRedirections.some(reg => {
return reg.test(decodeURIComponent(this.next))
})
) {
window.location.href = this.next;
} else {
this.$router.push({ name: 'NotFound' });
......
......@@ -539,7 +539,11 @@ export default {
]),
goBackToNext() {
if (this.$config.authorizedRedirections.includes(decodeURIComponent(this.next))) {
if (
this.$config.authorizedRedirections.some(reg => {
return reg.test(decodeURIComponent(this.next))
})
) {
this.$router.push(this.$route.path);
window.location.pathname = this.next;
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment