This commit is contained in:
@@ -54,7 +54,7 @@ function handleError(action, error, route, reject) {
|
|||||||
//reaction to directly entered or opened link, not application logic driving it, so home is safest choice
|
//reaction to directly entered or opened link, not application logic driving it, so home is safest choice
|
||||||
//
|
//
|
||||||
if (error.message && error.message.includes("NotAuthorized")) {
|
if (error.message && error.message.includes("NotAuthorized")) {
|
||||||
store.commit("logItem", "User is not authorized!");
|
store.commit("logItem", "Not authorized, redirecting to HOME");
|
||||||
gzevent.$emit("popup-message", gzlocale.get("ErrorUserNotAuthorized"));
|
gzevent.$emit("popup-message", gzlocale.get("ErrorUserNotAuthorized"));
|
||||||
router.push("/");
|
router.push("/");
|
||||||
return reject("[ErrorUserNotAuthorized]");
|
return reject("[ErrorUserNotAuthorized]");
|
||||||
@@ -62,7 +62,7 @@ function handleError(action, error, route, reject) {
|
|||||||
|
|
||||||
//Handle 401 not authenticated
|
//Handle 401 not authenticated
|
||||||
if (error.message && error.message.includes("NotAuthenticated")) {
|
if (error.message && error.message.includes("NotAuthenticated")) {
|
||||||
store.commit("logItem", "User is not authenticated, redirecting to login");
|
store.commit("logItem", "User is not authenticated, redirecting to LOGIN");
|
||||||
auth.logout();
|
auth.logout();
|
||||||
router.push("/login");
|
router.push("/login");
|
||||||
return reject("[ErrorUserNotAuthenticated]");
|
return reject("[ErrorUserNotAuthenticated]");
|
||||||
|
|||||||
Reference in New Issue
Block a user