mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Fixes issue with auth login redirect failure
This commit is contained in:
parent
a8e8d141d2
commit
3d6727ff4c
4 changed files with 10 additions and 6 deletions
|
@ -45,7 +45,7 @@ export default Ember.Route.extend(ApplicationRouteMixin, TooltipMixin, {
|
|||
|
||||
if (is.not.include(next, '/auth/')) {
|
||||
window.location.href= next;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -40,14 +40,20 @@ function getAppUrl(domain) {
|
|||
}
|
||||
|
||||
function isAjaxAccessError(reason) {
|
||||
if (typeof reason === "undefined" || typeof reason.errors === "undefined") {
|
||||
if (typeof reason === "undefined") {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (reason.errors.length > 0 && (reason.errors[0].status === "401" || reason.errors[0].status === "403")) {
|
||||
if (reason.message === 'Ajax authorization failed') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof reason.errors === "undefined") {
|
||||
if (reason.errors.length > 0 && (reason.errors[0].status === "401" || reason.errors[0].status === "403")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue