mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUAC-1126: Maintain session-local data through login/logout events broadcast from the authentication service.
This commit is contained in:
		| @@ -30,7 +30,8 @@ angular.module('client').factory('guacClientManager', ['$injector', | ||||
|     var ManagedClient = $injector.get('ManagedClient'); | ||||
|  | ||||
|     // Required services | ||||
|     var $window = $injector.get('$window'); | ||||
|     var $window    = $injector.get('$window'); | ||||
|     var $rootScope = $injector.get('$rootScope'); | ||||
|  | ||||
|     var service = {}; | ||||
|  | ||||
| @@ -144,6 +145,11 @@ angular.module('client').factory('guacClientManager', ['$injector', | ||||
|     // Disconnect all clients when window is unloaded | ||||
|     $window.addEventListener('unload', service.clear); | ||||
|  | ||||
|     // Clear clients on logout | ||||
|     $rootScope.$on('guacLogout', function handleLogout() { | ||||
|         service.clear(); | ||||
|     }); | ||||
|  | ||||
|     return service; | ||||
|  | ||||
| }]); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user