mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +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
|
// Set selectable and selected states based on current permissions
|
||||||
for (var conn_id in group_view.connections) {
|
for (var conn_id in group_view.connections) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user