mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Fixed overwrite primery group if user has no permissions for this group on update agent
This commit is contained in:
parent
a4d1cfc9e6
commit
304a3b40c2
@ -279,6 +279,7 @@ if (isset($groups[$grupo]) || $new_agent) {
|
|||||||
$table->data[4][1] = html_print_select_groups(false, "AR", false, 'grupo', $grupo, '', '', 0, true);
|
$table->data[4][1] = html_print_select_groups(false, "AR", false, 'grupo', $grupo, '', '', 0, true);
|
||||||
} else {
|
} else {
|
||||||
$table->data[4][1] = groups_get_name($grupo);
|
$table->data[4][1] = groups_get_name($grupo);
|
||||||
|
$table->data[4][1] .= html_print_input_hidden('grupo', $grupo, true);
|
||||||
}
|
}
|
||||||
$table->data[4][1] .= ' <span id="group_preview">';
|
$table->data[4][1] .= ' <span id="group_preview">';
|
||||||
$table->data[4][1] .= ui_print_group_icon ($grupo, true);
|
$table->data[4][1] .= ui_print_group_icon ($grupo, true);
|
||||||
|
@ -800,10 +800,9 @@ if ($update_agent) { // if modified some agent paramenter
|
|||||||
ui_print_error_message(__('No agent alias specified'));
|
ui_print_error_message(__('No agent alias specified'));
|
||||||
//If there is an agent with the same name, but a different ID
|
//If there is an agent with the same name, but a different ID
|
||||||
}
|
}
|
||||||
/*elseif (agents_get_agent_id ($nombre_agente) > 0 &&
|
if ($grupo <= 0) {
|
||||||
agents_get_agent_id ($nombre_agente) != $id_agente) {
|
ui_print_error_message(__('The group id %d is incorrect.', $grupo));
|
||||||
ui_print_error_message(__('There is already an agent in the database with this name'));
|
}
|
||||||
}*/
|
|
||||||
else {
|
else {
|
||||||
//If different IP is specified than previous, add the IP
|
//If different IP is specified than previous, add the IP
|
||||||
if ($direccion_agente != '' &&
|
if ($direccion_agente != '' &&
|
||||||
|
@ -1046,7 +1046,6 @@ class Tree {
|
|||||||
|
|
||||||
// Modules SQL
|
// Modules SQL
|
||||||
if ($item_for_count === false) {
|
if ($item_for_count === false) {
|
||||||
html_debug("traza", true);
|
|
||||||
//FIXME This group ACL should be the same in all modules view
|
//FIXME This group ACL should be the same in all modules view
|
||||||
$group_acl = " AND (ta.id_grupo IN ($user_groups_str) OR tasg.id_group IN ($user_groups_str))";
|
$group_acl = " AND (ta.id_grupo IN ($user_groups_str) OR tasg.id_group IN ($user_groups_str))";
|
||||||
$sql = "SELECT $columns
|
$sql = "SELECT $columns
|
||||||
|
Loading…
x
Reference in New Issue
Block a user