diff --git a/front/core/services/auth.js b/front/core/services/auth.js index fc8ba2d63..c3aa6a3c7 100644 --- a/front/core/services/auth.js +++ b/front/core/services/auth.js @@ -7,18 +7,15 @@ import UserError from 'core/lib/user-error'; * @property {Boolean} loggedIn Whether the user is currently logged */ export default class Auth { - constructor($http, $q, vnApp, $translate, $state, $transitions, $window, vnToken, vnModules, aclService) { + constructor($http, $q, $state, $transitions, $window, vnToken, vnModules) { Object.assign(this, { $http, $q, - vnApp, - $translate, $state, $transitions, $window, vnToken, vnModules, - aclService, loggedIn: false }); } @@ -111,13 +108,11 @@ export default class Auth { headers: {Authorization: json.data.token} }).then(({data}) => { this.vnToken.set(json.data.token, data.multimediaToken.id, now, json.data.ttl, remember); - this.loadAcls().then(() => { - let continueHash = this.$state.params.continue; - if (continueHash) - this.$window.location = continueHash; - else - this.$state.go('home'); - }); + let continueHash = this.$state.params.continue; + if (continueHash) + this.$window.location = continueHash; + else + this.$state.go('home'); }).catch(() => {}); } @@ -131,7 +126,7 @@ export default class Auth { this.vnToken.unset(); this.loggedIn = false; this.vnModules.reset(); - this.aclService.reset(); + this.vnModules.aclService.reset(); this.$state.go('login'); return promise;