2009-04-01 Esteban Sanchez <estebans@artica.es>

* godmode/alerts/alert_compounds.php: Fixed group All.

	* godmode/alerts/configure_alert_compound.php: Fixed group All.
	"Compound" labels renamed to "Correlated".

	* include/styles/pandora.css: Removed invisible class, which was
	duplicated from common.css.

	* include/functions_db.php: safe_acl_group() now handles group All.
	Fixes #2725019 and #2723089



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1586 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Esteban Sanchez 2009-04-01 14:00:52 +00:00
parent 4afa5e190b
commit 31f37e6719
5 changed files with 25 additions and 8 deletions

View File

@ -1,3 +1,16 @@
2009-04-01 Esteban Sanchez <estebans@artica.es>
* godmode/alerts/alert_compounds.php: Fixed group All.
* godmode/alerts/configure_alert_compound.php: Fixed group All.
"Compound" labels renamed to "Correlated".
* include/styles/pandora.css: Removed invisible class, which was
duplicated from common.css.
* include/functions_db.php: safe_acl_group() now handles group All.
Fixes #2725019 and #2723089
2009-04-01 Esteban Sanchez <estebans@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: Added

View File

@ -39,7 +39,10 @@ if ($search != '');
$url .= '&search='.$search;
$groups = get_user_groups (0, 'LM');
$agents = get_group_agents ($id_group, false, "none");
if ($id_group != 1 && isset ($groups[$id_group]))
$agents = get_group_agents ($id_group, false, "none");
else
$agents = get_group_agents (array_keys ($groups), false, "none");
$delete_alert = (int) get_parameter ('delete_alert');
$enable_alert = (int) get_parameter ('enable_alert');
@ -75,7 +78,7 @@ if ($disable_alert) {
return;
}
echo '<h1>'.__('Compound alerts').'</h1>';
echo '<h1>'.__('Correlated alerts').'</h1>';
$table->id = 'filter_compound_table';
$table->width = '90%';

View File

@ -271,10 +271,12 @@ if ($update_compound) {
}
}
echo '<h1>'.__('Configure compound alert').'</h1>';
echo '<h1>'.__('Configure correlated alert').'</h1>';
print_alert_compound_steps ($step, $id);
$groups = get_user_groups ();
$table->id = 'compound';
$table->width = '90%';
$table->style = array ();
@ -433,8 +435,7 @@ if ($step == 2) {
$table->data[0][1] = print_input_text ('name', $name, '', 35, 255, true);
$table->data[1][0] = __('Assigned to');
$groups = get_user_groups ();
$table->data[1][1] = print_select (get_group_agents (),
$table->data[1][1] = print_select (get_group_agents (array_keys ($groups)),
'id_agent', $id_agent, '', __('Select'), 0, true);
$table->data[2][0] = __('Description');
$table->data[2][1] = print_textarea ('description', 10, 30,

View File

@ -162,6 +162,9 @@ function give_acl ($id_user, $id_group, $access) {
*/
function safe_acl_group ($id_user, $id_groups, $access) {
if (!is_array ($id_groups) && check_acl ($id_user, $id_groups, $access)) {
/* Return all the user groups if it's the group All */
if ($id_groups == 1 || $id_groups == 0)
return array_keys (get_user_groups ($id_user, $access));
return array ($id_groups);
} elseif (!is_array ($id_groups)) {
return array ();

View File

@ -743,9 +743,6 @@ code, pre {
select#template, select#action {
width: 250px;
}
.invisible {
display: none;
}
#label-checkbox-matches_value,
#label-checkbox-copy_modules,
#label-checkbox-copy_alerts {