Merge branch 'ent-2626-pantalla-de-edicion-de-modulos-en-grupos-secundarios-2' into 'develop'
Fixed overwrite primery group if user has no permissions for this group on update agent See merge request artica/pandorafms!1690
This commit is contained in:
commit
9433c9ddd1
|
@ -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);
|
||||
} else {
|
||||
$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] .= 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'));
|
||||
//If there is an agent with the same name, but a different ID
|
||||
}
|
||||
/*elseif (agents_get_agent_id ($nombre_agente) > 0 &&
|
||||
agents_get_agent_id ($nombre_agente) != $id_agente) {
|
||||
ui_print_error_message(__('There is already an agent in the database with this name'));
|
||||
}*/
|
||||
if ($grupo <= 0) {
|
||||
ui_print_error_message(__('The group id %d is incorrect.', $grupo));
|
||||
}
|
||||
else {
|
||||
//If different IP is specified than previous, add the IP
|
||||
if ($direccion_agente != '' &&
|
||||
|
|
|
@ -1046,7 +1046,6 @@ class Tree {
|
|||
|
||||
// Modules SQL
|
||||
if ($item_for_count === false) {
|
||||
html_debug("traza", true);
|
||||
//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))";
|
||||
$sql = "SELECT $columns
|
||||
|
|
Loading…
Reference in New Issue