Return 403 if the user logged in is now an org and handle it on the client
This commit is contained in:
parent
743e95c50e
commit
07b9128ab6
2 changed files with 13 additions and 4 deletions
|
@ -867,7 +867,14 @@ quayApp.directive('ngBlur', function() {
|
|||
};
|
||||
});
|
||||
|
||||
quayApp.run(['$location', '$rootScope', function($location, $rootScope) {
|
||||
quayApp.run(['$location', '$rootScope', 'Restangular', 'UserService', function($location, $rootScope, Restangular, UserService) {
|
||||
Restangular.setResponseInterceptor(function(data, operation, what, url, response, deferred) {
|
||||
if (response.status == 403) {
|
||||
UserService.load();
|
||||
}
|
||||
return data;
|
||||
});
|
||||
|
||||
$rootScope.$on('$routeChangeSuccess', function (event, current, previous) {
|
||||
if (current.$$route.title) {
|
||||
$rootScope.title = current.$$route.title;
|
||||
|
|
Reference in a new issue