Skip to content

Commit ae8a59c

Browse files
committed
Auth bug fix.
1 parent e22e214 commit ae8a59c

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/app/modules/common/common.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
};
3030
}
3131

32-
3332
session.$inject = ['$http'];
3433
function session($http) {
3534
var session = this;
@@ -61,17 +60,11 @@
6160
};
6261

6362
this.checkAccess = function(event, toState) {
64-
session.pending && _onSessionPending(event);
6563
if (!session.getCurrentUser() && !(toState.data && toState.data.noAuth)) {
6664
event.preventDefault();
6765
$state.go(this.stateName);
6866
}
6967
};
70-
71-
function _onSessionPending(event) {
72-
event.preventDefault();
73-
setTimeout($urlRouter.sync, 0);
74-
}
7568
}
7669

7770
})();

src/app/modules/core/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
$scope.app = config;
1717

18-
$scope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
18+
$scope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
1919
auth.checkAccess(event, toState);
2020
});
2121

0 commit comments

Comments
 (0)