diff options
| author | EoleDev <EoleDev@outlook.fr> | 2016-04-14 15:38:55 +0200 |
|---|---|---|
| committer | EoleDev <EoleDev@outlook.fr> | 2016-04-14 15:38:55 +0200 |
| commit | 27730911d8c9253a4f5aa90450c57cdeca9d5d26 (patch) | |
| tree | d431134576049226e36d8e92945333f5a59186d1 /client/js/services/Identity.js | |
| parent | c32933b362874d99207a4305d09b203dcbf20585 (diff) | |
| parent | 237b627bf6cdf31e8923fc67653a73b6b9978540 (diff) | |
Merge commit '237b627' into develop
Diffstat (limited to 'client/js/services/Identity.js')
| -rw-r--r-- | client/js/services/Identity.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/client/js/services/Identity.js b/client/js/services/Identity.js index f9d1df4..73e5d86 100644 --- a/client/js/services/Identity.js +++ b/client/js/services/Identity.js @@ -1,5 +1,5 @@ -mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){ +mainApp.factory('Identity',[ '$http', '$cookies', '$rootScope', function($http, $cookies, $rootScope){ /* Create profile structure to store informations * about current session @@ -27,17 +27,19 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){ && typeof tokenPart_1InCookie !== 'undefined' ){ - if(token!==null){ + //if(token!==null){ // If yes, put it into variables angular.extend(profile, profileInCookie); token=tokenPart_0InCookie+tokenPart_1InCookie; - - } + //} // Return I'm Login return true; } - + + // Show the login overlay + $rootScope.$broadcast("logoutEvent"); + // Return I'm not Login return false; } @@ -56,7 +58,9 @@ mainApp.factory('Identity',[ '$http', '$cookies', function($http, $cookies){ profile.projectname=null; // Reload Page - location.reload(); + //location.reload(); + $rootScope.$broadcast("logoutEvent"); + } |
