From b5816ddd4dba2298313acf43c0d34a7990ad6ca1 Mon Sep 17 00:00:00 2001 From: jsatoh Date: Wed, 3 Apr 2013 04:28:24 +0000 Subject: [PATCH] 2013-04-03 Junichi Satoh * godmode/alerts/alert_actions.php: Fixed that any groups are shown to all users even if user has no permission to access the group. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7918 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/alerts/alert_actions.php | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7aa3d9d918..2e6f1b5d1b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-04-03 Junichi Satoh + + * godmode/alerts/alert_actions.php: Fixed that any groups are shown + to all users even if user has no permission to access the group. + 2013-04-03 Junichi Satoh * extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql, diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index e9a9965b48..2c79798145 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -344,7 +344,11 @@ $table->align[1] = 'center'; $table->align[2] = 'center'; $table->align[3] = 'center'; -$actions = db_get_all_rows_in_table ('talert_actions'); +$filter = array(); +if (!is_user_admin($config['id_user'])) + $filter['id_group'] = array_keys(users_get_groups(false, "LM")); + +$actions = db_get_all_rows_filter ('talert_actions', $filter); if ($actions === false) $actions = array ();