1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 06:39:43 +02:00

Refactoring fof nav elements across both editions

This commit is contained in:
McMatts 2018-04-05 20:01:10 +01:00
parent 5fb41e9fb1
commit c92ab3a589
15 changed files with 40 additions and 24 deletions

View file

@ -40,15 +40,15 @@ export default AjaxService.extend({
// when unauthorized on local API AJAX calls, redirect to app root
if (status === 401 && is.not.undefined(appVersion) && is.not.includes(window.location.href, '/auth')) {
this.get('localStorage').clearAll();
this.get('localStorage').clearAll();
window.location.href = 'auth/login';
}
if (is.not.empty(userUpdate)) {
let latest = JSON.parse(userUpdate);
if (!latest.active || user.editor !== latest.editor || user.admin !== latest.admin || user.viewUsers !== latest.viewUsers) {
this.get('localStorage').clearAll();
if (!latest.active || user.editor !== latest.editor || user.admin !== latest.admin || user.analytics !== latest.analytics || user.viewUsers !== latest.viewUsers) {
this.get('localStorage').clearAll();
window.location.href = 'auth/login';
}
}