mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 09:03:21 +00:00 
			
		
		
		
	#268: Implement UserManager.clear() and UserManager.setUsers().
This commit is contained in:
		| @@ -475,11 +475,34 @@ GuacAdmin.UserManager = function() { | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     /** | ||||
|      * Removes all visible usernames. | ||||
|      */ | ||||
|     this.clear = function() { | ||||
|  | ||||
|         // Remove all elements | ||||
|         for (var item in user_manager.items) | ||||
|             element.removeChild(user_manager.items[item].getElement()); | ||||
|  | ||||
|         // Remove all items | ||||
|         user_manager.items = {}; | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     /** | ||||
|      * Sets all visible usernames. | ||||
|      *  | ||||
|      * @param {String[]} users Array of usernames to add. | ||||
|      */ | ||||
|     this.setUsers = function(users) { | ||||
|         /* STUB */ | ||||
|  | ||||
|         // Clear all users | ||||
|         user_manager.clear(); | ||||
|  | ||||
|         // Add given users | ||||
|         for (var i=0; i<users.length; i++) | ||||
|             user_manager.add(users[i]); | ||||
|  | ||||
|     }; | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user