mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	Monitor group checkboxes for changes and update perms.
This commit is contained in:
		| @@ -536,6 +536,27 @@ GuacAdmin.UserEditor = function(name, parameters) { | ||||
|  | ||||
|         }; | ||||
|  | ||||
|         // Update group permissions when changed | ||||
|         group_view.ongroupchange = function(group, selected) { | ||||
|  | ||||
|             var id = group.id; | ||||
|  | ||||
|             // Update permission deltas for ADDED permission | ||||
|             if (selected) { | ||||
|                 added_perms.read_connection_group[id] = true; | ||||
|                 if (removed_perms.read_connection_group[id]) | ||||
|                     delete removed_perms.read_connection_group[id]; | ||||
|             } | ||||
|  | ||||
|             // Update permission deltas for REMOVED permission | ||||
|             else { | ||||
|                 removed_perms.read_connection_group[id] = true; | ||||
|                 if (added_perms.read_connection_group[id]) | ||||
|                     delete added_perms.read_connection_group[id]; | ||||
|             } | ||||
|  | ||||
|         }; | ||||
|  | ||||
|         // Set selectable and selected states based on current permissions | ||||
|         for (var conn_id in group_view.connections) { | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user