From 2221dce997cbdb2b7cc8d2837b47fd88067c4add Mon Sep 17 00:00:00 2001 From: javilanz Date: Thu, 17 Feb 2011 17:17:29 +0000 Subject: [PATCH] 2011-02-17 Javier Lanz * godmode/gis_maps/index.php: Show only user's GIS maps Fix: #3183432 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3904 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/godmode/gis_maps/index.php | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 52b214a395..3bd4c4ad20 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-02-17 Javier Lanz + * godmode/gis_maps/index.php: Show only user's GIS maps + + Fix: #3183432 + 2011-02-17 Ramon Novoa * include/help/en/help_agent_status.php, diff --git a/pandora_console/godmode/gis_maps/index.php b/pandora_console/godmode/gis_maps/index.php index 360f006354..cf2deced80 100644 --- a/pandora_console/godmode/gis_maps/index.php +++ b/pandora_console/godmode/gis_maps/index.php @@ -80,8 +80,13 @@ $defaultMapId = null; if (!$maps) { echo '
'.('No maps defined').'
'; } else { + $own_info = get_user_info($config['id_user']); foreach ($maps as $map) { - + if (!check_acl ($config["id_user"], $map["group_id"], "IR")) { + continue; + } + if ($map['group_id'] == 0 && (!$own_info['is_admin'] || !give_acl ($config['id_user'], 0, "PM"))) + continue; $checked = false; if ($map['default_map']) { $checked = true;