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:
parent
5fb41e9fb1
commit
c92ab3a589
15 changed files with 40 additions and 24 deletions
|
@ -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';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue