2011-02-27 Miguel de Dios <miguel.dedios@artica.es>

* extensions/users_connected.php: fixed the double negation in the
	check_acl.

	* include/functions_events.php, include/functions_modules.php,
	include/functions_reporting.php, include/functions_filemanager.php,
	include/functions_config.php, include/ajax/reporting.ajax.php,
	include/ajax/visual_console_builder.ajax.php,
	include/ajax/alert_list.ajax.php, include/help/es/modu_group_list.php,
	include/fgraph.php, include/functions.php, include/functions_db.php,
	include/functions_alerts.php, include/functions_reports.php,
	extensions/insert_data.php, extensions/system_info.php,
	extensions/pandora_logs.php, extensions/agents_modules.php,
	extensions/dbmanager.php, extensions/resource_registration.php,
	extensions/update_manager/settings.php, extensions/update_manager/main.php,
	extensions/plugin_registration.php, operation/incidents/incident.php,
	operation/incidents/incident_detail.php,
	operation/incidents/incident_statistics.php, operation/extensions.php,
	operation/visual_console/render_view.php,
	operation/visual_console/index.php, operation/agentes/status_monitor.php,
	operation/agentes/export_csv.php,
	operation/agentes/estado_ultimopaquete.php,
	operation/agentes/datos_agente.php, operation/agentes/alerts_status.php,
	operation/agentes/estado_generalagente.php,
	operation/agentes/custom_fields.php, operation/agentes/estado_agente.php,
	operation/agentes/networkmap.topology.php,
	operation/agentes/networkmap.groups.php, operation/agentes/sla_view.php,
	operation/agentes/exportdata.php, operation/agentes/gis_view.php,
	operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php,
	operation/agentes/graphs.php, operation/agentes/agent_fields.php,
	operation/agentes/group_view.php, operation/agentes/networkmap.php,
	operation/servers/view_server.php, operation/servers/view_server_detail.php,
	operation/menu.php, operation/snmpconsole/snmp_view.php,
	operation/users/user_edit.php, operation/events/event_statistics.php,
	operation/events/export_csv.php, operation/events/sound_events.php,
	operation/events/events_validate.php, operation/events/events_list.php,
	operation/events/events_marquee.php, operation/events/events.php,
	operation/search_reports.php, operation/reporting/reporting_xml.php,
	operation/reporting/reporting_viewer.php,
	operation/reporting/graph_viewer.php, operation/search_maps.php,
	mobile/operation/agents/monitor_status.php,
	mobile/operation/agents/view_agents.php, mobile/index.php, 
	general/ui/agents_list.php, godmode/groups/modu_group_list.php,
	godmode/groups/configure_group.php, godmode/groups/configure_modu_group.php,
	godmode/groups/group_list.php, godmode/admin_access_logs.php,
	godmode/extensions.php, godmode/db/db_main.php, godmode/db/db_audit.php,
	godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php,
	godmode/db/db_event.php, godmode/db/db_purge.php,
	godmode/agentes/fields_manager.php, godmode/agentes/module_manager.php,
	godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php,
	godmode/agentes/configure_field.php, godmode/agentes/planned_downtime.php,
	godmode/agentes/manage_config_remote.php, godmode/servers/recon_script.php,
	godmode/servers/plugin.php, godmode/servers/manage_recontask.php,
	godmode/servers/modificar_server.php,
	godmode/servers/manage_recontask_form.php, godmode/menu.php,
	godmode/alerts/alert_list.list.php,
	godmode/alerts/configure_alert_compound.php,
	godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
	godmode/alerts/configure_alert_template.php,
	godmode/alerts/alert_templates.php,
	godmode/alerts/configure_alert_action.php,
	godmode/alerts/configure_alert_command.php,
	godmode/alerts/alert_actions.php, godmode/alerts/alert_list.builder.php,
	godmode/alerts/alert_commands.php, godmode/snmpconsole/snmp_alert.php,
	godmode/snmpconsole/snmp_filters.php, godmode/setup/file_manager.php,
	godmode/setup/os.list.php, godmode/setup/news.php,
	godmode/setup/gis_step_2.php, godmode/setup/links.php,
	godmode/setup/setup.php, godmode/setup/os.php, 
	godmode/setup/performance.php, godmode/setup/setup_auth.php,
	godmode/setup/gis.php, godmode/setup/os.builder.php,
	godmode/setup/setup_visuals.php, godmode/users/user_list.php,
	godmode/users/configure_user.php, godmode/users/configure_profile.php,
	godmode/gis_maps/configure_gis_map.php, godmode/gis_maps/index.php,
	godmode/massive/massive_add_alerts.php,
	godmode/massive/massive_copy_modules.php,
	godmode/massive/massive_delete_agents.php,
	godmode/massive/massive_operations.php,
	godmode/massive/massive_edit_agents.php,
	godmode/massive/massive_delete_action_alerts.php,
	godmode/massive/massive_delete_modules.php,
	godmode/massive/massive_delete_alerts.php,
	godmode/massive/massive_edit_modules.php,
	godmode/massive/massive_add_action_alerts.php,
	godmode/modules/manage_network_components_form.php,
	godmode/modules/manage_nc_groups_form.php,
	godmode/modules/manage_network_templates.php,
	godmode/modules/module_list.php,
	godmode/modules/manage_network_components_form_common.php,
	godmode/modules/manage_network_components_form_network.php,
	godmode/modules/manage_network_templates_form.php,
	godmode/modules/manage_network_components_form_wmi.php,
	godmode/modules/manage_network_components.php,
	godmode/modules/manage_nc_groups.php,
	godmode/reporting/reporting_builder.list_items.php,
	godmode/reporting/graph_builder.main.php,
	godmode/reporting/visual_console_builder.wizard.php,
	godmode/reporting/visual_console_builder.php,
	godmode/reporting/reporting_builder.preview.php,
	godmode/reporting/reporting_builder.main.php,
	godmode/reporting/visual_console_builder.data.php,
	godmode/reporting/visual_console_builder.elements.php,
	godmode/reporting/graph_builder.php,
	godmode/reporting/visual_console_builder.preview.php,
	godmode/reporting/graph_builder.graph_editor.php,
	godmode/reporting/reporting_builder.php,
	godmode/reporting/visual_console_builder.editor.php,
	godmode/reporting/reporting_builder.item_editor.php,
	godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
	godmode/reporting/graph_builder.preview.php: replaced obsolete "give_acl" to
	"check_acl" and erased the "give_acl".



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4025 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-02-28 12:02:08 +00:00
parent ab628dce69
commit 1cfce3b525
164 changed files with 428 additions and 324 deletions

View File

@ -1,3 +1,114 @@
2011-02-27 Miguel de Dios <miguel.dedios@artica.es>
* extensions/users_connected.php: fixed the double negation in the
check_acl.
* include/functions_events.php, include/functions_modules.php,
include/functions_reporting.php, include/functions_filemanager.php,
include/functions_config.php, include/ajax/reporting.ajax.php,
include/ajax/visual_console_builder.ajax.php,
include/ajax/alert_list.ajax.php, include/help/es/modu_group_list.php,
include/fgraph.php, include/functions.php, include/functions_db.php,
include/functions_alerts.php, include/functions_reports.php,
extensions/insert_data.php, extensions/system_info.php,
extensions/pandora_logs.php, extensions/agents_modules.php,
extensions/dbmanager.php, extensions/resource_registration.php,
extensions/update_manager/settings.php, extensions/update_manager/main.php,
extensions/plugin_registration.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php, operation/extensions.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php, operation/agentes/status_monitor.php,
operation/agentes/export_csv.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/datos_agente.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/custom_fields.php, operation/agentes/estado_agente.php,
operation/agentes/networkmap.topology.php,
operation/agentes/networkmap.groups.php, operation/agentes/sla_view.php,
operation/agentes/exportdata.php, operation/agentes/gis_view.php,
operation/agentes/estado_monitores.php, operation/agentes/ver_agente.php,
operation/agentes/graphs.php, operation/agentes/agent_fields.php,
operation/agentes/group_view.php, operation/agentes/networkmap.php,
operation/servers/view_server.php, operation/servers/view_server_detail.php,
operation/menu.php, operation/snmpconsole/snmp_view.php,
operation/users/user_edit.php, operation/events/event_statistics.php,
operation/events/export_csv.php, operation/events/sound_events.php,
operation/events/events_validate.php, operation/events/events_list.php,
operation/events/events_marquee.php, operation/events/events.php,
operation/search_reports.php, operation/reporting/reporting_xml.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php, operation/search_maps.php,
mobile/operation/agents/monitor_status.php,
mobile/operation/agents/view_agents.php, mobile/index.php,
general/ui/agents_list.php, godmode/groups/modu_group_list.php,
godmode/groups/configure_group.php, godmode/groups/configure_modu_group.php,
godmode/groups/group_list.php, godmode/admin_access_logs.php,
godmode/extensions.php, godmode/db/db_main.php, godmode/db/db_audit.php,
godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php,
godmode/db/db_event.php, godmode/db/db_purge.php,
godmode/agentes/fields_manager.php, godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php, godmode/agentes/configurar_agente.php,
godmode/agentes/configure_field.php, godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php, godmode/servers/recon_script.php,
godmode/servers/plugin.php, godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php, godmode/menu.php,
godmode/alerts/alert_list.list.php,
godmode/alerts/configure_alert_compound.php,
godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php,
godmode/alerts/configure_alert_template.php,
godmode/alerts/alert_templates.php,
godmode/alerts/configure_alert_action.php,
godmode/alerts/configure_alert_command.php,
godmode/alerts/alert_actions.php, godmode/alerts/alert_list.builder.php,
godmode/alerts/alert_commands.php, godmode/snmpconsole/snmp_alert.php,
godmode/snmpconsole/snmp_filters.php, godmode/setup/file_manager.php,
godmode/setup/os.list.php, godmode/setup/news.php,
godmode/setup/gis_step_2.php, godmode/setup/links.php,
godmode/setup/setup.php, godmode/setup/os.php,
godmode/setup/performance.php, godmode/setup/setup_auth.php,
godmode/setup/gis.php, godmode/setup/os.builder.php,
godmode/setup/setup_visuals.php, godmode/users/user_list.php,
godmode/users/configure_user.php, godmode/users/configure_profile.php,
godmode/gis_maps/configure_gis_map.php, godmode/gis_maps/index.php,
godmode/massive/massive_add_alerts.php,
godmode/massive/massive_copy_modules.php,
godmode/massive/massive_delete_agents.php,
godmode/massive/massive_operations.php,
godmode/massive/massive_edit_agents.php,
godmode/massive/massive_delete_action_alerts.php,
godmode/massive/massive_delete_modules.php,
godmode/massive/massive_delete_alerts.php,
godmode/massive/massive_edit_modules.php,
godmode/massive/massive_add_action_alerts.php,
godmode/modules/manage_network_components_form.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_components_form_common.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.list_items.php,
godmode/reporting/graph_builder.main.php,
godmode/reporting/visual_console_builder.wizard.php,
godmode/reporting/visual_console_builder.php,
godmode/reporting/reporting_builder.preview.php,
godmode/reporting/reporting_builder.main.php,
godmode/reporting/visual_console_builder.data.php,
godmode/reporting/visual_console_builder.elements.php,
godmode/reporting/graph_builder.php,
godmode/reporting/visual_console_builder.preview.php,
godmode/reporting/graph_builder.graph_editor.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/visual_console_builder.editor.php,
godmode/reporting/reporting_builder.item_editor.php,
godmode/reporting/map_builder.php, godmode/reporting/graphs.php,
godmode/reporting/graph_builder.preview.php: replaced obsolete "give_acl" to
"check_acl" and erased the "give_acl".
2011-02-28 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/ajax/visual_console_builder.ajax.php

View File

@ -20,7 +20,7 @@ function mainAgentsModules() {
check_login ();
// ACL Check
if (! give_acl ($config['id_user'], 0, "AR")) {
if (! check_acl ($config['id_user'], 0, "AR")) {
pandora_audit("ACL Violation",
"Trying to access Agent view (Grouped)");
require ("general/noaccess.php");
@ -32,7 +32,7 @@ function mainAgentsModules() {
// Made it a subquery, much faster on both the database and server side
if (isset ($_GET["update_netgroup"])) {
$group = get_parameter_get ("update_netgroup", 0);
if (give_acl ($config['id_user'], $group, "AW")) {
if (check_acl ($config['id_user'], $group, "AW")) {
$sql = sprintf ("UPDATE tagente_modulo SET `flag` = 1 WHERE `id_agente` = ANY(SELECT id_agente FROM tagente WHERE `id_grupo` = %d)",$group);
process_sql ($sql);
}

View File

@ -50,7 +50,7 @@ function dbmgr_extension_main () {
require_css_file ('dbmanager', 'extensions/dbmanager/');
global $config;
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -48,7 +48,7 @@ function mainInsertData() {
if (! give_acl ($config['id_user'], 0, "AW") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "AW") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -36,7 +36,7 @@ function view_logfile ($file_name) {
function pandoralogs_extension_main () {
global $config;
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -15,7 +15,7 @@
function pluginreg_extension_main () {
global $config;
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -29,7 +29,7 @@ In the xml is the tag "module_source"
function resource_registration_extension_main() {
global $config;
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -213,7 +213,7 @@ function show_array($title, $anchor, $array = array()) {
function mainSystemInfo() {
global $config;
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -55,7 +55,7 @@ if ($update_package) {
$package = um_client_check_latest_update ($settings, $user_key);
if (give_acl ($config['id_user'], 0, 'PM')) {
if (check_acl ($config['id_user'], 0, 'PM')) {
if (is_int ($package) && $package == 1) {
echo '<h5 class="suc">'.__('Your system is up-to-date').'.</h5>';

View File

@ -16,7 +16,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, 'PM')) {
if (! check_acl ($config['id_user'], 0, 'PM')) {
pandora_audit("ACL Violation", "Trying to use Open Update Manager extension");
include ("general/noaccess.php");
return;

View File

@ -18,7 +18,7 @@ function users_extension_main() {
function users_extension_main_god ($god = true) {
if (isset($config["id_user"])) {
if (!!give_acl ($config["id_user"], 0, "UM")) {
if (!check_acl ($config["id_user"], 0, "UM")) {
return;
}
}
@ -71,7 +71,7 @@ function users_extension_main_god ($god = true) {
add_godmode_menu_option (__('Users connected'), 'UM','gusuarios',"users/icon.png");
if (isset($config["id_user"])) {
if (give_acl ($config["id_user"], 0, "UM")) {
if (check_acl ($config["id_user"], 0, "UM")) {
add_operation_menu_option(__('Users connected'), 'usuarios',"users/icon.png");
}
}

View File

@ -24,7 +24,7 @@ if (is_ajax ()) {
$filter = str_replace ("\\\"", "\"", $_POST['filter']);
$filter = json_decode ($filter, true);
$id_group = (int) get_parameter ('id_group');
if ($id_group > 0 && give_acl ($config['id_user'], $id_group, $access))
if ($id_group > 0 && check_acl ($config['id_user'], $id_group, $access))
$filter['id_grupo'] = $id_group;
else
$filter['id_grupo'] = array_keys (get_user_groups (false, $access));

View File

@ -24,7 +24,7 @@ check_login ();
$enterprise_include = enterprise_include_once('godmode/admin_access_logs.php');
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit( "ACL Violation",
"Trying to access event viewer");
require ("general/noaccess.php");

View File

@ -27,7 +27,7 @@ $group = 0;
if ($id_agente)
$group = get_agent_group ($id_agente);
if (! give_acl ($config["id_user"], $group, "AW")) {
if (! check_acl ($config["id_user"], $group, "AW")) {
pandora_audit("ACL Violation",
"Trying to access agent manager");
require ("general/noaccess.php");
@ -488,7 +488,7 @@ if ($update_agent) { // if modified some agent paramenter
if ($id_agente) {
//This has been done in the beginning of the page, but if an agent was created, this id might change
$id_grupo = get_agent_group ($id_agente);
if (give_acl ($config["id_user"], $id_grupo, "AW") != 1) {
if (check_acl ($config["id_user"], $id_grupo, "AW") != 1) {
pandora_audit("ACL Violation","Trying to admin an agent without access");
require ("general/noaccess.php");
exit;
@ -528,7 +528,7 @@ $edit_module = (bool) get_parameter ('edit_module');
if ($update_module || $create_module) {
$id_grupo = get_agent_group ($id_agente);
if (! give_acl ($config["id_user"], $id_grupo, "AW")) {
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
pandora_audit("ACL Violation",
"Trying to create a module without admin rights");
require ("general/noaccess.php");
@ -752,7 +752,7 @@ if ($delete_module) { // DELETE agent module !
$module_data = get_db_row ('tagente_modulo', 'id_agente_modulo', $id_borrar_modulo);
$id_grupo = (int) dame_id_grupo ($id_agente);
if (! give_acl ($config["id_user"], $id_grupo, "AW")) {
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
pandora_audit("ACL Violation",
"Trying to delete a module without admin rights");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation", "Trying to access Group Management2");
require ("general/noaccess.php");
return;

View File

@ -19,7 +19,7 @@ global $config;
check_login();
if (! give_acl($config['id_user'], 0, "PM")) {
if (! check_acl($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Group Management");
require ("general/noaccess.php");

View File

@ -23,7 +23,7 @@ $id_group = get_parameter ("id_group", -1);
$update_agent = get_parameter ("update_agent", -1);
$update_group = get_parameter ("update_group", -1);
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access remote config copy tool");
require ("general/noaccess.php");
@ -123,7 +123,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) {
$result=mysql_query($sql1);
while ($row=mysql_fetch_array($result)){
if (give_acl ($config["id_user"], $row["id_grupo"], "AR")){
if (check_acl ($config["id_user"], $row["id_grupo"], "AR")){
$source = $config["remote_config"]."/conf/". md5($row["nombre"]).".conf";
if (file_exists($source)){
echo "<option value=".$row["id_agente"].">".$row["nombre"]."</option>";
@ -144,7 +144,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) {
$result=mysql_query($sql1);
while ($row=mysql_fetch_array($result)){
if (give_acl ($config["id_user"], $row["id_grupo"], "AW"))
if (check_acl ($config["id_user"], $row["id_grupo"], "AW"))
echo "<option value=".$row["id_agente"].">".$row["nombre"]."</option>";
}
echo '</select>';

View File

@ -29,7 +29,7 @@ if ($ag_group == -1 )
if (($ag_group == -1) && ($group_id != 0))
$ag_group = $group_id;
if (! give_acl ($config["id_user"], 0, "AW")) {
if (! check_acl ($config["id_user"], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access agent manager");
require ("general/noaccess.php");
@ -46,7 +46,7 @@ if (!empty($agent_to_delete)) {
$id_agente = $agent_to_delete;
$agent_name = get_agent_name ($id_agente);
$id_grupo = dame_id_grupo ($id_agente);
if (give_acl ($config["id_user"], $id_grupo, "AW")==1) {
if (check_acl ($config["id_user"], $id_grupo, "AW")==1) {
$id_agentes[0] = $id_agente;
delete_agent($id_agentes);
pandora_audit("Agent management", "Delete Agent " . $agent_name);
@ -245,7 +245,7 @@ if ($agents !== false) {
$iterator = 0;
foreach ($agents as $agent) {
$id_grupo = $agent["id_grupo"];
if (! give_acl ($config["id_user"], $id_grupo, "AW"))
if (! check_acl ($config["id_user"], $id_grupo, "AW"))
continue;
if ($color == 1){
$tdcolor = "datos";

View File

@ -83,7 +83,7 @@ if ($multiple_delete) {
foreach($id_agent_modules_delete as $id_agent_module_del) {
$id_grupo = (int) dame_id_grupo ($id_agente);
if (! give_acl ($config["id_user"], $id_grupo, "AW")) {
if (! check_acl ($config["id_user"], $id_grupo, "AW")) {
pandora_audit("ACL Violation",
"Trying to delete a module without admin rights");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access downtime scheduler");
require ("general/noaccess.php");
@ -199,7 +199,7 @@ if ($create_downtime || $update_downtime) {
$data = array ();
if ($downtimes)
foreach ($downtimes as $downtime) {
if (give_acl ($config["id_user"], $downtime['id_grupo'], "AR")) {
if (check_acl ($config["id_user"], $downtime['id_grupo'], "AR")) {
$data[$downtime['id_agente']] = $downtime['nombre'];
}
}

View File

@ -20,7 +20,7 @@ require_once ("include/functions_alerts.php");
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access Alert actions");
require ("general/noaccess.php");
@ -57,7 +57,7 @@ if ($copy_action) {
// If user tries to copy an action with group=ALL
if ($al_action['id_group'] == 0){
// then must have "PM" access privileges
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -68,7 +68,7 @@ if ($copy_action) {
// If user tries to copy an action of others groups
}else{
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
else
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));
@ -142,7 +142,7 @@ if ($update_action) {
if ($al_action !== false){
if ($al_action['id_group'] == 0){
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -200,7 +200,7 @@ if ($delete_action) {
// If user tries to delete an action with group=ALL
if ($al_action['id_group'] == 0){
// then must have "PM" access privileges
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -211,7 +211,7 @@ if ($delete_action) {
// If user tries to delete an action of others groups
}else{
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
else
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));

View File

@ -21,7 +21,7 @@ require_once ("include/functions_alerts.php");
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");

View File

@ -15,7 +15,7 @@
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
// Login check
check_login ();
if (! give_acl ($config['id_user'], 0, "LW")) {
if (! check_acl ($config['id_user'], 0, "LW")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -65,7 +65,7 @@ $table->data[1][0] = __('Template');
$table->data[1][0] = __('Template');
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$templates = get_alert_templates (false, array ('id', 'name'));
else{
$usr_groups = get_user_groups($config['id_user'], 'LW', true);
@ -78,7 +78,7 @@ $table->data[1][1] = print_select (index_array ($templates, 'id', 'name'),
'template', '', '', __('Select'), 0, true);
$table->data[1][1] .= ' <a class="template_details invisible" href="#">' .
print_image("images/zoom.png", true, array("class" => 'img_help')) . '</a>';
if (give_acl ($config['id_user'], 0, "LM")) {
if (check_acl ($config['id_user'], 0, "LM")) {
$table->data[1][1] .= print_image ('images/add.png', true);
$table->data[1][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template">';
$table->data[1][1] .= __('Create Template');
@ -101,7 +101,7 @@ $table->data[2][1] .= print_input_text ('fires_max', '', '', 4, 10, true);
$table->data[2][1] .= print_help_icon ("alert-matches", true);
$table->data[2][1] .= '</span>';
$table->data[2][1] .= '</div>';
if (give_acl ($config['id_user'], 0, "LM")) {
if (check_acl ($config['id_user'], 0, "LM")) {
$table->data[2][1] .= print_image ('images/add.png', true);
$table->data[2][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action">';
$table->data[2][1] .= __('Create Action');

View File

@ -18,7 +18,7 @@ global $config;
// Login check
check_login ();
if (! give_acl ($config['id_user'], 0, "LW")) {
if (! check_acl ($config['id_user'], 0, "LW")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -27,7 +27,7 @@ if (! give_acl ($config['id_user'], 0, "LW")) {
/* Check if this page is included from a agent edition */
if (! give_acl ($config['id_user'], 0, "LW")) {
if (! check_acl ($config['id_user'], 0, "LW")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
// Login check
check_login ();
if (! give_acl ($config['id_user'], 0, "LW")) {
if (! check_acl ($config['id_user'], 0, "LW")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");

View File

@ -99,7 +99,7 @@ if (is_ajax ()) {
return;
}
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -139,7 +139,7 @@ if ($delete_template) {
if ($al_template !== false){
// If user tries to delete a template with group=ALL then must have "PM" access privileges
if ($al_template['id_group'] == 0){
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -150,7 +150,7 @@ if ($delete_template) {
// If user tries to delete a template of others groups
}else{
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
else
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));

View File

@ -20,7 +20,7 @@ require_once ('include/functions_alerts.php');
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -35,7 +35,7 @@ if ($al_action !== false){
// If user tries to edit an action with group=ALL
if ($al_action['id_group'] == 0){
// then must have "PM" access privileges
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -46,7 +46,7 @@ if ($al_action !== false){
// If user tries to edit an action of others groups
}else{
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
else
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));
@ -99,7 +99,7 @@ $table->data[1][0] = __('Group');
$groups = get_user_groups ();
$own_info = get_user_info ($config['id_user']);
// Only display group "All" if user is administrator or has "PM" privileges
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$display_all_group = true;
else
$display_all_group = false;
@ -109,7 +109,7 @@ $table->data[2][0] = __('Command');
$table->data[2][1] = print_select_from_sql ('SELECT id, name FROM talert_commands',
'id_command', $id_command, '', __('None'), 0, true);
$table->data[2][1] .= ' ';
if (give_acl ($config['id_user'], 0, "PM")){
if (check_acl ($config['id_user'], 0, "PM")){
$table->data[2][1] .= print_image ('images/add.png', true);
$table->data[2][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_command">';
$table->data[2][1] .= __('Create Command');

View File

@ -19,7 +19,7 @@ require_once ("include/functions_alerts.php");
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -227,7 +227,7 @@ if ($id && ! $create_compound) {
$field3_recovery = $compound['field3_recovery'];
$id_agent = $compound['id_agent'];
$id_group = get_agent_group ($id_agent);
if (! give_acl ($config['id_user'], $id_group, "AW")) {
if (! check_acl ($config['id_user'], $id_group, "AW")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");

View File

@ -19,7 +19,7 @@ require_once ('include/functions_alerts.php');
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -42,7 +42,7 @@ if ($a_template !== false){
// If user tries to duplicate/edit a template with group=ALL
if ($a_template['id_group'] == 0){
// then must have "PM" access privileges
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
require ("general/noaccess.php");
@ -53,7 +53,7 @@ if ($a_template !== false){
// If user tries to duplicate/edit a template of others groups
}else{
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$own_groups = array_keys(get_user_groups($config['id_user'], "LM"));
else
$own_groups = array_keys(get_user_groups($config['id_user'], "LM", false));
@ -519,7 +519,7 @@ if ($step == 2) {
$groups = get_user_groups ();
$own_info = get_user_info($config['id_user']);
// Only display group "All" if user is administrator or has "PM" privileges
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$display_all_group = true;
else
$display_all_group = false;

View File

@ -20,7 +20,7 @@ print_page_header (__('Database maintenance').' &raquo; '.__('Database audit pur
check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) {
if (! check_acl ($config['id_user'], 0, "DM")) {
pandora_audit("ACL Violation",
"Trying to access Database Management Audit");
require ("general/noaccess.php");

View File

@ -20,7 +20,7 @@ check_login ();
print_page_header (__('Database maintenance').' &raquo; '.__('Event database cleanup'), "images/god8.png", false, "", true);
if (! give_acl ($config['id_user'], 0, "DM")) {
if (! check_acl ($config['id_user'], 0, "DM")) {
pandora_audit("ACL Violation", "Trying to access Database Management Event");
require ("general/noaccess.php");
exit;

View File

@ -26,7 +26,7 @@ print_page_header (__('Database maintenance').' &raquo; '.__('Database informati
check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) {
if (! check_acl ($config['id_user'], 0, "DM")) {
pandora_audit("ACL Violation",
"Trying to access Database Management Info");
require ("general/noaccess.php");

View File

@ -23,7 +23,7 @@ if ($config['flash_charts']) {
check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) {
if (! check_acl ($config['id_user'], 0, "DM")) {
pandora_audit("ACL Violation",
"Trying to access Database Management");
require ("general/noaccess.php");

View File

@ -24,7 +24,7 @@ if ($config['flash_charts']) {
check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) {
if (! check_acl ($config['id_user'], 0, "DM")) {
pandora_audit( "ACL Violation",
"Trying to access Database Purge Section");
include ("general/noaccess.php");

View File

@ -20,7 +20,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) {
if (! check_acl ($config['id_user'], 0, "DM")) {
pandora_audit("ACL Violation","Trying to access Database Debug Admin section");
require ("general/noaccess.php");
exit;

View File

@ -19,7 +19,7 @@ global $config;
check_login();
if (! give_acl ($config["id_user"], 0, "DM")) {
if (! check_acl ($config["id_user"], 0, "DM")) {
pandora_audit("ACL Violation",
"Trying to access Database cure section");
require ("general/noaccess.php");

View File

@ -15,7 +15,7 @@
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access extensions list");
include ("general/noaccess.php");

View File

@ -78,7 +78,7 @@ function updateArrowLayers() {
</script>
<?php
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation", "Trying to access map builder");
require ("general/noaccess.php");
return;
@ -334,7 +334,7 @@ $table->data[1][1] = "<table class='databox' border='0' id='map_connection'>
</tr> " . addConectionMapsInForm($map_connection_list) . "
</table>";
$own_info = get_user_info($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$display_all_group = true;
else
$display_all_group = false;

View File

@ -21,7 +21,7 @@ require_once ('include/functions_gis.php');
require_javascript_file('openlayers.pandora');
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation", "Trying to access map builder");
require ("general/noaccess.php");
return;
@ -50,7 +50,7 @@ if (is_ajax ()) {
$action = get_parameter('action');
$own_info = get_user_info($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$display_default_column = true;
else
$display_default_column = false;
@ -91,7 +91,7 @@ if (!$maps) {
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")))
if ($map['group_id'] == 0 && (!$own_info['is_admin'] || !check_acl ($config['id_user'], 0, "PM")))
continue;
$checked = false;
if ($map['default_map']) {

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation", "Trying to access Group Management2");
require ("general/noaccess.php");
return;

View File

@ -19,7 +19,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation", "Trying to access Group Management2");
require ("general/noaccess.php");
return;

View File

@ -22,7 +22,7 @@ check_login();
require_once("include/functions_groups.php");
if (is_ajax ()) {
if (! give_acl($config['id_user'], 0, "AR")) {
if (! check_acl($config['id_user'], 0, "AR")) {
pandora_audit("ACL Violation", "Trying to access Group Management");
require ("general/noaccess.php");
return;
@ -46,7 +46,7 @@ if (is_ajax ()) {
return;
}
if (! give_acl ($config['id_user'], $id_group, "AR")) {
if (! check_acl ($config['id_user'], $id_group, "AR")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
echo json_encode (false);
@ -63,7 +63,7 @@ if (is_ajax ()) {
$id_group = (int) get_parameter ('id_group');
$disabled = (int) get_parameter ('disabled', 0);
if (! give_acl ($config['id_user'], $id_group, "AR")) {
if (! check_acl ($config['id_user'], $id_group, "AR")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
echo json_encode (false);
@ -77,7 +77,7 @@ if (is_ajax ()) {
return;
}
if (! give_acl($config['id_user'], 0, "PM")) {
if (! check_acl($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Group Management");
require ("general/noaccess.php");

View File

@ -20,7 +20,7 @@ global $config;
check_login();
if (! give_acl($config['id_user'], 0, "PM")) {
if (! check_acl($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Group Management");
require ("general/noaccess.php");
@ -34,7 +34,7 @@ if (is_ajax ()) {
if ($get_group_json) {
$id_group = (int) get_parameter ('id_group');
if (! give_acl ($config['id_user'], $id_group, "AR")) {
if (! check_acl ($config['id_user'], $id_group, "AR")) {
pandora_audit("ACL Violation",
"Trying to access Alert Management");
echo json_encode (false);

View File

@ -16,7 +16,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access massive agent deletion section");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access massive alert deletion");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access Agent Config Management Admin section");
require ("general/noaccess.php");

View File

@ -16,7 +16,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access massive agent deletion section");
require ("general/noaccess.php");

View File

@ -16,7 +16,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access massive agent deletion section");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access massive alert deletion");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access agent massive deletion");
require ("general/noaccess.php");

View File

@ -16,7 +16,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access massive agent deletion section");
require ("general/noaccess.php");

View File

@ -16,7 +16,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access massive module update");
require ("general/noaccess.php");

View File

@ -16,7 +16,7 @@
// Load global vars
check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) {
if (! check_acl ($config['id_user'], 0, "AW")) {
pandora_audit("ACL Violation",
"Trying to access massive operation section");
require ("general/noaccess.php");

View File

@ -23,7 +23,7 @@ require_once ('include/functions_menu.php');
$menu = array ();
$menu['class'] = 'godmode';
if (give_acl ($config['id_user'], 0, "AW")) {
if (check_acl ($config['id_user'], 0, "AW")) {
$menu["gagente"]["text"] = __('Manage agents');
$menu["gagente"]["sec2"] = "godmode/agentes/modificar_agente";
$menu["gagente"]["id"] = "god-agents";
@ -31,7 +31,7 @@ if (give_acl ($config['id_user'], 0, "AW")) {
$sub = array ();
$sub["godmode/agentes/manage_config_remote"]["text"] = __('Duplicate config');
if (give_acl ($config["id_user"], 0, "PM")) {
if (check_acl ($config["id_user"], 0, "PM")) {
$sub["godmode/groups/group_list"]["text"] = __('Manage groups');
$sub["godmode/groups/modu_group_list"]["text"] = __('Module groups');
@ -43,7 +43,7 @@ if (give_acl ($config['id_user'], 0, "AW")) {
$menu["gagente"]["sub"] = $sub;
}
if (give_acl ($config['id_user'], 0, "AW")) {
if (check_acl ($config['id_user'], 0, "AW")) {
$menu["gmassive"]["text"] = __('Massive operations');
$menu["gmassive"]["sec2"] = "godmode/massive/massive_operations";
$menu["gmassive"]["id"] = "god-massive";
@ -60,11 +60,11 @@ if (give_acl ($config['id_user'], 0, "AW")) {
$menu["gmassive"]["sub"] = $sub;
}
if (give_acl ($config['id_user'], 0, "AW")) {
if (check_acl ($config['id_user'], 0, "AW")) {
enterprise_hook ('services_godmenu');
}
if (give_acl ($config['id_user'], 0, "PM")) {
if (check_acl ($config['id_user'], 0, "PM")) {
$menu["gmodules"]["text"] = __('Manage modules');
$menu["gmodules"]["sec2"] = "godmode/modules/module_list";
$menu["gmodules"]["id"] = "god-modules";
@ -83,7 +83,7 @@ if (give_acl ($config['id_user'], 0, "PM")) {
$menu["gmodules"]["sub"] = $sub;
}
if (give_acl ($config['id_user'], 0, "LM")) {
if (check_acl ($config['id_user'], 0, "LM")) {
$menu["galertas"]["text"] = __('Manage alerts');
$menu["galertas"]["sec2"] = "godmode/alerts/alert_list";
$menu["galertas"]["id"] = "god-alerts";
@ -93,7 +93,7 @@ if (give_acl ($config['id_user'], 0, "LM")) {
$sub["godmode/alerts/alert_actions"]["text"] = __('Actions');
if (give_acl ($config['id_user'], 0, "PM")) {
if (check_acl ($config['id_user'], 0, "PM")) {
$sub["godmode/alerts/alert_commands"]["text"] = __('Commands');
}
$sub["godmode/alerts/alert_compounds"]["text"] = __('Correlation');
@ -101,11 +101,11 @@ if (give_acl ($config['id_user'], 0, "LM")) {
$menu["galertas"]["sub"] = $sub;
}
if (give_acl ($config['id_user'], 0, "AW")) {
if (check_acl ($config['id_user'], 0, "AW")) {
enterprise_hook ('policies_menu');
}
if (give_acl ($config['id_user'], 0, "UM")) {
if (check_acl ($config['id_user'], 0, "UM")) {
$menu["gusuarios"]["text"] = __('Manage users');
$menu["gusuarios"]["sec2"] = "godmode/users/user_list";
$menu["gusuarios"]["id"] = "god-users";
@ -113,7 +113,7 @@ if (give_acl ($config['id_user'], 0, "UM")) {
}
// SNMP console
if (give_acl($config['id_user'], 0, "LW")) {
if (check_acl($config['id_user'], 0, "LW")) {
$menu["gsnmpconsole"]["text"] = __('Manage SNMP console');
$menu["gsnmpconsole"]["sec2"] = "godmode/snmpconsole/snmp_alert";
$menu["gsnmpconsole"]["id"] = "god-snmpc";
@ -128,7 +128,7 @@ if (give_acl($config['id_user'], 0, "LW")) {
}
// Reporting
if (give_acl ($config['id_user'], 0, "IW")) {
if (check_acl ($config['id_user'], 0, "IW")) {
$menu["greporting"]["text"] = __('Manage reports');
$menu["greporting"]["sec2"] = "godmode/reporting/reporting_builder";
$menu["greporting"]["id"] = "god-reporting";
@ -144,7 +144,7 @@ if (give_acl ($config['id_user'], 0, "IW")) {
$menu["greporting"]["sub"] = $sub;
}
if (give_acl ($config['id_user'], 0, "IW")) {
if (check_acl ($config['id_user'], 0, "IW")) {
// Custom map builder
$menu["gmap"]["text"] = __('Visual console builder');
$menu["gmap"]["sec2"] = "godmode/reporting/map_builder";
@ -158,7 +158,7 @@ if (give_acl ($config['id_user'], 0, "IW")) {
}
}
if (give_acl ($config['id_user'], 0, "PM")) {
if (check_acl ($config['id_user'], 0, "PM")) {
// Servers
$menu["gservers"]["text"] = __('Manage servers');
@ -177,11 +177,11 @@ if (give_acl ($config['id_user'], 0, "PM")) {
$menu["gservers"]["sub"] = $sub;
}
if (give_acl ($config['id_user'], 0, "LW")) {
if (check_acl ($config['id_user'], 0, "LW")) {
enterprise_hook ('snmpconsole_menu');
}
if (give_acl ($config['id_user'], 0, "PM")) {
if (check_acl ($config['id_user'], 0, "PM")) {
// Audit
$menu["glog"]["text"] = __('System audit log');
$menu["glog"]["sec2"] = "godmode/admin_access_logs";
@ -211,7 +211,7 @@ if (give_acl ($config['id_user'], 0, "PM")) {
$menu["gsetup"]["sub"] = $sub;
}
if (give_acl ($config['id_user'], 0, "DM")) {
if (check_acl ($config['id_user'], 0, "DM")) {
$menu["gdbman"]["text"] = __('DB maintenance');
$menu["gdbman"]["sec2"] = "godmode/db/db_main";
$menu["gdbman"]["id"] = "god-dbmaint";
@ -232,7 +232,7 @@ if (give_acl ($config['id_user'], 0, "DM")) {
$menu["gdbman"]["sub"] = $sub;
}
if (give_acl ($config['id_user'], 0, "PM")) {
if (check_acl ($config['id_user'], 0, "PM")) {
if (is_array ($config['extensions'])) {
$menu["gextensions"]["text"] = __('Extensions');
$menu["gextensions"]["sec2"] = "godmode/extensions";
@ -241,7 +241,7 @@ if (give_acl ($config['id_user'], 0, "PM")) {
$sub = array ();
foreach ($config['extensions'] as $extension) {
$extmenu = $extension['godmode_menu'];
if ($extension['godmode_menu'] == '' || ! give_acl ($config['id_user'], 0, $extmenu['acl'])) {
if ($extension['godmode_menu'] == '' || ! check_acl ($config['id_user'], 0, $extmenu['acl'])) {
continue;
}

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access SNMP Group Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access SNMO Groups Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Agent Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Agent Management");
require ("general/noaccess.php");

View File

@ -15,7 +15,7 @@
global $config;
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Agent Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Agent Management");
require ("general/noaccess.php");

View File

@ -19,7 +19,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Agent Management");
require ("general/noaccess.php");

View File

@ -19,7 +19,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Network Profile Management");
require ("general/noaccess.php");

View File

@ -19,7 +19,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Network Profile Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation","Trying to access module management");
require ("general/noaccess.php");
exit;

View File

@ -21,7 +21,7 @@ if ($config['flash_charts']) {
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access graph builder");
include ("general/noaccess.php");

View File

@ -50,7 +50,7 @@ if ($config['flash_charts']) {
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access graph builder");
include ("general/noaccess.php");
@ -103,7 +103,7 @@ if ($edit_graph) {
echo ">";
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$return_all_groups = true;
else
$return_all_groups = false;

View File

@ -50,7 +50,7 @@ if ($config['flash_charts']) {
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access graph builder");
include ("general/noaccess.php");

View File

@ -52,7 +52,7 @@ if ($config['flash_charts']) {
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access graph builder");
include ("general/noaccess.php");

View File

@ -20,7 +20,7 @@ require_once ('include/functions_custom_graphs.php');
// Check user credentials
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access Inventory Module Management");
require ("general/noaccess.php");
@ -36,7 +36,7 @@ print_page_header (__('Graphs management'), "", false, "", true);
// Delete module SQL code
if ($delete_graph) {
if (give_acl ($config['id_user'], 0, "AW")) {
if (check_acl ($config['id_user'], 0, "AW")) {
$sql = "DELETE FROM tgraph_source WHERE id_graph = $id";
if ($res=mysql_query($sql))
$result = "<h3 class=suc>".__('Successfully deleted')."</h3>";
@ -57,7 +57,7 @@ if ($delete_graph) {
}
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$return_all_group = true;
else
$return_all_group = false;
@ -80,7 +80,7 @@ if (! empty ($graphs)) {
$table->size[0] = '20px';
$table->size[3] = '125px';
$table->size[4] = '50px';
if (give_acl ($config['id_user'], 0, "AW")) {
if (check_acl ($config['id_user'], 0, "AW")) {
$table->align[5] = 'center';
$table->head[5] = __('Delete');
$table->size[5] = '50px';
@ -99,7 +99,7 @@ if (! empty ($graphs)) {
$data[3] = $graph["graphs_count"];
$data[4] = print_group_icon($graph['id_group'],true);
if (give_acl ($config['id_user'], 0, "AW")) {
if (check_acl ($config['id_user'], 0, "AW")) {
$data[5] = '<a href="index.php?sec=greporting&sec2=godmode/reporting/graphs&delete_graph=1&id='
.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
return false;">' . print_image("images/cross.png", true) . '</a>';

View File

@ -117,7 +117,7 @@ $table->align[4] = 'center';
// Only display maps of "All" group if user is administrator or has "PM" privileges, otherwise show only maps of user group
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$maps = get_user_layouts ();
else
$maps = get_user_layouts ($config['id_user'], false, false, false);
@ -126,7 +126,7 @@ if (!$maps) {
echo '<div class="nf">'.('No maps defined').'</div>';
} else {
foreach ($maps as $map) {
if (give_acl ($config['id_user'], $map['id_group'], "IW")){
if (check_acl ($config['id_user'], $map['id_group'], "IW")) {
$data = array ();
$data[0] = '<a href="index.php?sec=gmap&sec2=godmode/reporting/visual_console_builder&tab=data&amp;action=edit&amp;id_visual_console='.$map['id'].'">'.$map['name'].'</a>';

View File

@ -16,7 +16,7 @@ global $config;
// Login check
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");

View File

@ -16,7 +16,7 @@ global $config;
// Login check
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");

View File

@ -16,7 +16,7 @@ global $config;
// Login check
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");
@ -53,7 +53,7 @@ $table->data['name'][1] = print_input_text('name', $reportName, __('Name'), 20,
$table->data['group'][0] = __('Group');
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$return_all_groups = true;
else
$return_all_groups = false;

View File

@ -16,7 +16,7 @@ global $config;
// Login check
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");
@ -51,7 +51,7 @@ switch ($action) {
}
$own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$return_all_group = true;
else
$return_all_group = false;
@ -80,9 +80,9 @@ switch ($action) {
if (!is_user_admin ($config["id_user"])){
if ($report["private"] && $report["id_user"] != $config['id_user'])
if (!give_acl ($config["id_user"], $report["id_group"], "AW"))
if (!check_acl ($config["id_user"], $report["id_group"], "AW"))
continue;
if (!give_acl ($config["id_user"], $report["id_group"], "AW"))
if (!check_acl ($config["id_user"], $report["id_group"], "AW"))
continue;
}

View File

@ -23,7 +23,7 @@ $id_report = (int) get_parameter ('id_report');
$report = get_db_row ('treport', 'id_report', $id_report);
// Check ACL on the report to see if user has access to the report.
if (! give_acl ($config['id_user'], $report['id_group'], "AR")) {
if (! check_acl ($config['id_user'], $report['id_group'], "AR")) {
pandora_audit("ACL Violation","Trying to access graph reader");
include ("general/noaccess.php");
exit;

View File

@ -17,7 +17,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");
@ -52,7 +52,7 @@ $groups = get_user_groups ($config['id_user']);
$own_info = get_user_info($config['id_user']);
// Only display group "All" if user is administrator or has "PM" privileges
if ($own_info['is_admin'] || give_acl ($config['id_user'], 0, "PM"))
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$display_all_group = true;
else
$display_all_group = false;

View File

@ -17,7 +17,7 @@ global $config;
// Login check
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");

View File

@ -17,7 +17,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) {
if (! check_acl ($config['id_user'], 0, "IW")) {
pandora_audit("ACL Violation",
"Trying to access report builder");
require ("general/noaccess.php");

View File

@ -19,7 +19,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Recon Task Management");
require ("general/noaccess.php");

View File

@ -19,7 +19,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Agent Management");
require ("general/noaccess.php");

View File

@ -20,7 +20,7 @@ require_once ("include/functions_servers.php");
check_login();
if (! give_acl ($config["id_user"], 0, "PM")) {
if (! check_acl ($config["id_user"], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Server Management");
require ("general/noaccess.php");

View File

@ -29,7 +29,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access Plugin Management");
require ("general/noaccess.php");

View File

@ -29,7 +29,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) {
if (! check_acl ($config['id_user'], 0, "LM")) {
pandora_audit("ACL Violation",
"Trying to access recon script Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation", "Trying to access File manager");
require ("general/noaccess.php");
return;

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Visual Setup Management");
require ("general/noaccess.php");
return;

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Visual Setup Management");
require ("general/noaccess.php");
return;

View File

@ -17,7 +17,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Link Management");
require ("general/noaccess.php");
exit;

View File

@ -17,7 +17,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) {
if (! check_acl ($config['id_user'], 0, "PM")) {
pandora_audit("ACL Violation",
"Trying to access Link Management");
require ("general/noaccess.php");

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -31,7 +31,7 @@ if (is_ajax ()) {
}
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Setup Management");
require ("general/noaccess.php");
return;

View File

@ -18,7 +18,7 @@ global $config;
check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) {
pandora_audit("ACL Violation", "Trying to access Visual Setup Management");
require ("general/noaccess.php");
return;

Some files were not shown because too many files have changed in this diff Show More