'.html_print_submi
$upload_file_form = '
';
-if (check_acl($config['id_user'], 0, 'IW')) {
- $upload_file_form .= '
';
@@ -361,9 +348,8 @@ if (!empty($comments)) {
$upload_comment_form = '
';
-if (check_acl($config['id_user'], 0, 'IW')) {
- $upload_comment_form .= '';
-}
+$upload_comment_form .= '';
+
$upload_comment_form .= '
'.__('Comments').'
'.$comment_table.'';
diff --git a/pandora_console/operation/incidents/incident_statistics.php b/pandora_console/operation/incidents/incident_statistics.php
index af1867264f..2aa97ad46c 100755
--- a/pandora_console/operation/incidents/incident_statistics.php
+++ b/pandora_console/operation/incidents/incident_statistics.php
@@ -18,11 +18,9 @@ require_once $config['homedir'].'/include/functions_graph.php';
check_login();
-if (! check_acl($config['id_user'], 0, 'IR') && ! check_acl($config['id_user'], 0, 'IW') && ! check_acl($config['id_user'], 0, 'IM')) {
- db_pandora_audit('ACL Violation', 'Trying to access Incident section');
- include 'general/noaccess.php';
- exit;
-}
+db_pandora_audit('ACL Violation', 'Trying to access Incident section');
+require 'general/noaccess.php';
+exit;
ui_print_page_header(__('Incidents').' » '.__('Statistics'), 'images/book_edit.png', false, '', false, '');
diff --git a/pandora_console/operation/incidents/integriaims_export_csv.php b/pandora_console/operation/incidents/integriaims_export_csv.php
index d4be4443d6..04e0970ab4 100644
--- a/pandora_console/operation/incidents/integriaims_export_csv.php
+++ b/pandora_console/operation/incidents/integriaims_export_csv.php
@@ -20,14 +20,6 @@ require_once '../../include/functions_integriaims.php';
check_login();
-if (! check_acl($config['id_user'], 0, 'IR') && ! check_acl($config['id_user'], 0, 'IW') && ! check_acl($config['id_user'], 0, 'IM')) {
- // Doesn't have access to this page.
- db_pandora_audit('ACL Violation', 'Trying to access IntegriaIMS ticket creation');
- include 'general/noaccess.php';
- exit;
-}
-
-
// API calls.
$status_incident = integriaims_get_details('status');
$group_incident = integriaims_get_details('group');
diff --git a/pandora_console/operation/incidents/list_integriaims_incidents.php b/pandora_console/operation/incidents/list_integriaims_incidents.php
index c6f64750f1..eadf892b04 100644
--- a/pandora_console/operation/incidents/list_integriaims_incidents.php
+++ b/pandora_console/operation/incidents/list_integriaims_incidents.php
@@ -18,13 +18,6 @@ require_once 'include/functions_integriaims.php';
check_login();
-if (! check_acl($config['id_user'], 0, 'IR')) {
- // Doesn't have access to this page.
- db_pandora_audit('ACL Violation', 'Trying to access IntegriaIMS ticket creation');
- include 'general/noaccess.php';
- exit;
-}
-
// Header tabs.
$onheader = integriaims_tabs('list_tab');
ui_print_page_header(
@@ -266,9 +259,7 @@ $table->head[4] = __('Prior');
$table->head[5] = __('Updated/Started');
$table->head[6] = __('Creator');
$table->head[7] = __('Owner');
-if (check_acl($config['id_user'], 0, 'IW') || check_acl($config['id_user'], 0, 'IM')) {
- $table->head[8] = '';
-}
+$table->head[8] = '';
$table->data = [];
$i = 0;
@@ -294,18 +285,14 @@ foreach ($incidents_paginated as $key => $value) {
$table->data[$i][7] = $array_get_incidents[$key][5];
$table->data[$i][8] = '';
$table->cellclass[$i][8] = 'action_buttons';
- if (check_acl($config['id_user'], 0, 'IW')) {
- $table->data[$i][8] .= '
';
- $table->data[$i][8] .= html_print_image('images/config.png', true, ['title' => __('Edit')]);
- $table->data[$i][8] .= '';
- }
+ $table->data[$i][8] .= '
';
+ $table->data[$i][8] .= html_print_image('images/config.png', true, ['title' => __('Edit')]);
+ $table->data[$i][8] .= '';
- if (check_acl($config['id_user'], 0, 'IM')) {
- $table->data[$i][8] .= '
';
- $table->data[$i][8] .= html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']);
- $table->data[$i][8] .= '';
- }
+ $table->data[$i][8] .= '
';
+ $table->data[$i][8] .= html_print_image('images/cross.png', true, ['title' => __('Delete'), 'class' => 'invert_filter']);
+ $table->data[$i][8] .= '';
$i++;
}
@@ -320,13 +307,11 @@ if (empty($table->data) === true) {
}
// Show button to create incident.
-if (check_acl($config['id_user'], 0, 'IR')) {
- echo '
';
-}
+echo '
';
// Datapicker library for show calendar.
ui_require_jquery_file('ui.datepicker-'.get_user_language(), 'include/javascript/i18n/');
diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php
index d43829b753..11b873e0b3 100644
--- a/pandora_console/operation/menu.php
+++ b/pandora_console/operation/menu.php
@@ -267,9 +267,9 @@ if (check_acl($config['id_user'], 0, 'MR') || check_acl($config['id_user'], 0, '
$own_info = get_user_info($config['id_user']);
if ($own_info['is_admin'] || check_acl($config['id_user'], 0, 'PM')) {
- $own_groups = array_keys(users_get_groups($config['id_user'], 'IR'));
+ $own_groups = array_keys(users_get_groups($config['id_user'], 'MR'));
} else {
- $own_groups = array_keys(users_get_groups($config['id_user'], 'IR', false));
+ $own_groups = array_keys(users_get_groups($config['id_user'], 'MR', false));
}
foreach ($gisMaps as $gisMap) {
@@ -278,10 +278,6 @@ if (check_acl($config['id_user'], 0, 'MR') || check_acl($config['id_user'], 0, '
continue;
}
- if (! check_acl($config['id_user'], $gisMap['group_id'], 'IR')) {
- continue;
- }
-
$sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['text'] = mb_substr(io_safe_output($gisMap['map_name']), 0, 15);
$sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['id'] = mb_substr(io_safe_output($gisMap['map_name']), 0, 15);
$sub2['operation/gis_maps/render_view&map_id='.$gisMap['id_tgis_map']]['title'] = io_safe_output($gisMap['map_name']);
@@ -459,30 +455,25 @@ $sub['operation/users/user_edit_notifications']['refr'] = 0;
// Incidents.
-if (check_acl($config['id_user'], 0, 'IR')
- || check_acl($config['id_user'], 0, 'IW')
- || check_acl($config['id_user'], 0, 'IM')
-) {
- $temp_sec2 = $sec2;
- $sec2 = 'incident';
- $sec2sub = 'operation/incidents/incident_statistics';
- $sub[$sec2]['text'] = __('Incidents');
- $sub[$sec2]['id'] = 'Incidents';
- $sub[$sec2]['type'] = 'direct';
- $sub[$sec2]['subtype'] = 'nolink';
- $sub[$sec2]['refr'] = 0;
- $sub[$sec2]['subsecs'] = [
- 'operation/incidents/incident_detail',
- 'operation/integria_incidents',
- ];
+$temp_sec2 = $sec2;
+$sec2 = 'incident';
+$sec2sub = 'operation/incidents/incident_statistics';
+$sub[$sec2]['text'] = __('Incidents');
+$sub[$sec2]['id'] = 'Incidents';
+$sub[$sec2]['type'] = 'direct';
+$sub[$sec2]['subtype'] = 'nolink';
+$sub[$sec2]['refr'] = 0;
+$sub[$sec2]['subsecs'] = [
+ 'operation/incidents/incident_detail',
+ 'operation/integria_incidents',
+];
- $sub2 = [];
- $sub2[$sec2sub]['text'] = __('Integria IMS statistics');
- $sub2['operation/incidents/list_integriaims_incidents']['text'] = __('Integria IMS ticket list');
+$sub2 = [];
+$sub2[$sec2sub]['text'] = __('Integria IMS statistics');
+$sub2['operation/incidents/list_integriaims_incidents']['text'] = __('Integria IMS ticket list');
- $sub[$sec2]['sub2'] = $sub2;
- $sec2 = $temp_sec2;
-}
+$sub[$sec2]['sub2'] = $sub2;
+$sec2 = $temp_sec2;
// Messages.
diff --git a/pandora_console/operation/netflow/nf_live_view.php b/pandora_console/operation/netflow/nf_live_view.php
index dae0c9457a..a27686f8a7 100644
--- a/pandora_console/operation/netflow/nf_live_view.php
+++ b/pandora_console/operation/netflow/nf_live_view.php
@@ -370,7 +370,7 @@ if (is_metaconsole()) {
).'';
$own_info = get_user_info($config['id_user']);
echo '
'.__('Group').' | ';
- echo "
".html_print_select_groups($config['id_user'], 'IW', $own_info['is_admin'], 'assign_group', $filter['id_group'], '', '', -1, true, false, false).' | ';
+ echo "
".html_print_select_groups($config['id_user'], 'AR', $own_info['is_admin'], 'assign_group', $filter['id_group'], '', '', -1, true, false, false).' | ';
echo '';
$advanced_toggle = '
';
diff --git a/pandora_console/operation/search_graphs.getdata.php b/pandora_console/operation/search_graphs.getdata.php
index 9874ef37e2..13db4c2923 100644
--- a/pandora_console/operation/search_graphs.getdata.php
+++ b/pandora_console/operation/search_graphs.getdata.php
@@ -16,7 +16,7 @@ global $config;
require_once 'include/functions_custom_graphs.php';
// Check ACL
-$searchGraphs = check_acl($config['id_user'], 0, 'IR');
+$searchGraphs = check_acl($config['id_user'], 0, 'RR');
$graphs = false;
diff --git a/pandora_console/operation/search_graphs.php b/pandora_console/operation/search_graphs.php
index 69df4e4ded..8f76f0dea8 100755
--- a/pandora_console/operation/search_graphs.php
+++ b/pandora_console/operation/search_graphs.php
@@ -15,7 +15,7 @@ global $config;
require_once 'include/functions_custom_graphs.php';
-$searchGraphs = check_acl($config['id_user'], 0, 'IR');
+$searchGraphs = check_acl($config['id_user'], 0, 'RR');
if ($graphs === false || !$searchGraphs) {
echo "
".__('Zero results found')."
\n";
diff --git a/pandora_console/operation/search_helps.php b/pandora_console/operation/search_helps.php
index 2433355571..b205d265ef 100644
--- a/pandora_console/operation/search_helps.php
+++ b/pandora_console/operation/search_helps.php
@@ -13,8 +13,6 @@
// GNU General Public License for more details.
global $config;
-$totalHelps = check_acl($config['id_user'], 0, 'IR');
-
if ($helps === false || !$searchHelps) {
echo "
".__('Zero results found.').sprintf(
__('You can find more help in the
wiki'),
diff --git a/pandora_console/operation/search_maps.getdata.php b/pandora_console/operation/search_maps.getdata.php
index 2f8fa18a49..e96113cbb3 100644
--- a/pandora_console/operation/search_maps.getdata.php
+++ b/pandora_console/operation/search_maps.getdata.php
@@ -13,7 +13,7 @@
// GNU General Public License for more details.
global $config;
-$searchMaps = check_acl($config['id_user'], 0, 'IR');
+$searchMaps = check_acl($config['id_user'], 0, 'VR');
$maps = false;
$totalMaps = 0;
diff --git a/pandora_console/operation/search_maps.php b/pandora_console/operation/search_maps.php
index 804051f000..0ab656d9b5 100755
--- a/pandora_console/operation/search_maps.php
+++ b/pandora_console/operation/search_maps.php
@@ -13,7 +13,7 @@
// GNU General Public License for more details.
global $config;
-$searchMaps = check_acl($config['id_user'], 0, 'IR');
+$searchMaps = check_acl($config['id_user'], 0, 'VR');
if ($maps === false || !$searchMaps) {
echo "
".__('Zero results found')."
\n";
diff --git a/pandora_console/operation/search_reports.php b/pandora_console/operation/search_reports.php
index ee565676eb..d86b0c5446 100755
--- a/pandora_console/operation/search_reports.php
+++ b/pandora_console/operation/search_reports.php
@@ -19,9 +19,7 @@ require_once 'include/functions_reports.php';
$linkReport = false;
$searchReports = check_acl($config['id_user'], 0, 'RR');
-if (check_acl($config['id_user'], 0, 'IW')) {
- $linkReport = true;
-}
+$linkReport = true;
if ($reports === false || !$searchReports) {
echo "
".__('Zero results found')."
\n";
diff --git a/pandora_console/operation/search_results.php b/pandora_console/operation/search_results.php
index e1a9d078e3..5e0fa14384 100644
--- a/pandora_console/operation/search_results.php
+++ b/pandora_console/operation/search_results.php
@@ -19,7 +19,8 @@ enterprise_include('operation/reporting/custom_reporting.php');
$searchAgents = $searchAlerts = $searchModules = check_acl($config['id_user'], 0, 'AR');
$searchUsers = $searchPolicies = check_acl($config['id_user'], 0, 'AR');
-$searchMaps = $searchReports = $searchGraphs = check_acl($config['id_user'], 0, 'IR');
+$searchReports = $searchGraphs = check_acl($config['id_user'], 0, 'RR');
+$searchMaps = check_acl($config['id_user'], 0, 'VR');
$searchMain = true;
$searchHelps = true;
diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php
index 5442f75823..1ac05621bc 100755
--- a/pandora_console/operation/snmpconsole/snmp_view.php
+++ b/pandora_console/operation/snmpconsole/snmp_view.php
@@ -133,10 +133,10 @@ if ($config['pure']) {
// OPERATIONS
-// Delete SNMP Trap entry Event (only incident management access).
+// Delete SNMP Trap entry Event.
if (isset($_GET['delete'])) {
$id_trap = (int) get_parameter_get('delete', 0);
- if ($id_trap > 0 && check_acl($config['id_user'], 0, 'IM')) {
+ if ($id_trap > 0) {
if ($group_by) {
$sql_ids_traps = 'SELECT id_trap, source FROM ttrap WHERE oid IN (SELECT oid FROM ttrap WHERE id_trap = '.$id_trap.')
AND source IN (SELECT source FROM ttrap WHERE id_trap = '.$id_trap.')';
@@ -156,42 +156,30 @@ if (isset($_GET['delete'])) {
__('Could not be deleted')
);
}
- } else {
- db_pandora_audit(
- 'ACL Violation',
- 'Trying to delete SNMP event ID #'.$id_trap
- );
}
}
-// Check Event (only incident write access).
+// Check Event.
if (isset($_GET['check'])) {
$id_trap = (int) get_parameter_get('check', 0);
- if (check_acl($config['id_user'], 0, 'IW')) {
- $values = [
- 'status' => 1,
- 'id_usuario' => $config['id_user'],
- ];
- $result = db_process_sql_update('ttrap', $values, ['id_trap' => $id_trap]);
- enterprise_hook('snmp_update_forwarded_modules', [$id_trap]);
+ $values = [
+ 'status' => 1,
+ 'id_usuario' => $config['id_user'],
+ ];
+ $result = db_process_sql_update('ttrap', $values, ['id_trap' => $id_trap]);
+ enterprise_hook('snmp_update_forwarded_modules', [$id_trap]);
- ui_print_result_message(
- $result,
- __('Successfully updated'),
- __('Could not be updated')
- );
- } else {
- db_pandora_audit(
- 'ACL Violation',
- 'Trying to checkout SNMP Trap ID'.$id_trap
- );
- }
+ ui_print_result_message(
+ $result,
+ __('Successfully updated'),
+ __('Could not be updated')
+ );
}
// Mass-process DELETE.
if (isset($_POST['deletebt'])) {
$trap_ids = get_parameter_post('snmptrapid', []);
- if (is_array($trap_ids) && check_acl($config['id_user'], 0, 'IW')) {
+ if (is_array($trap_ids)) {
if ($group_by) {
foreach ($trap_ids as $key => $value) {
$sql_ids_traps = 'SELECT id_trap, source FROM ttrap WHERE oid IN (SELECT oid FROM ttrap WHERE id_trap = '.$value.')
@@ -210,28 +198,18 @@ if (isset($_POST['deletebt'])) {
enterprise_hook('snmp_update_forwarded_modules', [$forward_info]);
}
}
- } else {
- db_pandora_audit(
- 'ACL Violation',
- 'Trying to mass-delete SNMP Trap ID'
- );
}
}
// Mass-process UPDATE.
if (isset($_POST['updatebt'])) {
$trap_ids = get_parameter_post('snmptrapid', []);
- if (is_array($trap_ids) && check_acl($config['id_user'], 0, 'IW')) {
+ if (is_array($trap_ids)) {
foreach ($trap_ids as $id_trap) {
$sql = sprintf("UPDATE ttrap SET status = 1, id_usuario = '%s' WHERE id_trap = %d", $config['id_user'], $id_trap);
db_process_sql($sql);
enterprise_hook('snmp_update_forwarded_modules', [$id_trap]);
}
- } else {
- db_pandora_audit(
- 'ACL Violation',
- 'Trying to mass-delete SNMP Trap ID'
- );
}
}
@@ -1025,7 +1003,7 @@ if ($traps !== false) {
// Actions.
$data[8] = '';
- if (empty($trap['status']) && check_acl($config['id_user'], 0, 'IW')) {
+ if (empty($trap['status'])) {
$data[8] .= '
'.html_print_image('images/ok.png', true, ['border' => '0', 'title' => __('Validate')]).' ';
}
@@ -1045,17 +1023,15 @@ if ($traps !== false) {
} else {
$agent_trap_group = db_get_value('id_grupo', 'tagente', 'nombre', $trap['source']);
- if ((check_acl($config['id_user'], $agent_trap_group, 'IM'))) {
- $data[8] .= '
'.html_print_image(
- 'images/cross.png',
- true,
- [
- 'border' => '0',
- 'title' => __('Delete'),
- 'class' => 'invert_filter',
- ]
- ).' ';
- }
+ $data[8] .= '
'.html_print_image(
+ 'images/cross.png',
+ true,
+ [
+ 'border' => '0',
+ 'title' => __('Delete'),
+ 'class' => 'invert_filter',
+ ]
+ ).' ';
}
$data[8] .= '
'.html_print_image(
@@ -1217,14 +1193,11 @@ if ($idx == 0) {
unset($table);
echo '';
-if (check_acl($config['id_user'], 0, 'IW')) {
- html_print_submit_button(__('Validate'), 'updatebt', false, 'class="sub ok"');
-}
-if (check_acl($config['id_user'], 0, 'IM')) {
- echo ' ';
- html_print_submit_button(__('Delete'), 'deletebt', false, 'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"');
-}
+html_print_submit_button(__('Validate'), 'updatebt', false, 'class="sub ok"');
+
+echo ' ';
+html_print_submit_button(__('Delete'), 'deletebt', false, 'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"');
echo '
';
diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql
index b06ee1709a..59bfa1996e 100644
--- a/pandora_console/pandoradb.sql
+++ b/pandora_console/pandoradb.sql
@@ -1049,9 +1049,6 @@ CREATE TABLE IF NOT EXISTS `torigen` (
CREATE TABLE IF NOT EXISTS `tperfil` (
`id_perfil` int(10) unsigned NOT NULL auto_increment,
`name` TEXT NOT NULL,
- `incident_edit` tinyint(1) NOT NULL DEFAULT 0,
- `incident_view` tinyint(1) NOT NULL DEFAULT 0,
- `incident_management` tinyint(1) NOT NULL DEFAULT 0,
`agent_view` tinyint(1) NOT NULL DEFAULT 0,
`agent_edit` tinyint(1) NOT NULL DEFAULT 0,
`alert_edit` tinyint(1) NOT NULL DEFAULT 0,
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 49a8ea7d76..cfdced90cf 100755
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -192,8 +192,8 @@ sub help_screen{
help_screen_line('--add_profile', ' ', 'Add perfil to user');
help_screen_line('--delete_profile', ' ', 'Delete perfil from user');
help_screen_line('--add_profile_to_user', ' []', 'Add a profile in group to a user');
- help_screen_line('--create_profile', " \n\t \n\t \n\t \n\t ", 'Create profile');
- help_screen_line('--update_profile', " \n\t \n\t \n\t \n\t ", 'Modify profile');
+ help_screen_line('--create_profile', " \n\t \n\t \n\t \n\t ", 'Create profile');
+ help_screen_line('--update_profile', " \n\t \n\t \n\t \n\t ", 'Modify profile');
help_screen_line('--disable_eacl', '', 'Disable enterprise ACL system');
help_screen_line('--enable_eacl', '', 'Enable enterprise ACL system');
help_screen_line('--disable_double_auth', '', 'Disable the double authentication for the specified user');
@@ -563,14 +563,14 @@ sub pandora_create_user_profile ($$$$) {
##########################################################################
## Create profile.
##########################################################################
-sub pandora_create_profile ($$$$$$$$$$$$$$$$$$$$$$$$$) {
- my ($dbh, $profile_name, $incident_view,$incident_edit, $incident_management, $agent_view,
+sub pandora_create_profile ($$$$$$$$$$$$$$$$$$$$$$) {
+ my ($dbh, $profile_name, $agent_view,
$agent_edit, $agent_disable, $alert_edit, $alert_management, $user_management, $db_management,
$event_view, $event_edit, $event_management, $report_view, $report_edit, $report_management,
$map_view, $map_edit, $map_management, $vconsole_view, $vconsole_edit, $vconsole_management, $pandora_management) = @_;
- return db_insert ($dbh, 'id_up', 'INSERT INTO tperfil (name,incident_view,incident_edit,incident_management,agent_view,agent_edit,agent_disable,alert_edit,alert_management,user_management,db_management,event_view,event_edit,event_management,report_view,report_edit,report_management,map_view,map_edit,map_management,vconsole_view,vconsole_edit,vconsole_management,pandora_management) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);',
- safe_input($profile_name), $incident_view,$incident_edit, $incident_management, $agent_view,
+ return db_insert ($dbh, 'id_up', 'INSERT INTO tperfil (name,agent_view,agent_edit,agent_disable,alert_edit,alert_management,user_management,db_management,event_view,event_edit,event_management,report_view,report_edit,report_management,map_view,map_edit,map_management,vconsole_view,vconsole_edit,vconsole_management,pandora_management) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);',
+ safe_input($profile_name), $agent_view,
$agent_edit, $agent_disable, $alert_edit, $alert_management, $user_management, $db_management,
$event_view, $event_edit, $event_management, $report_view, $report_edit, $report_management,
$map_view, $map_edit, $map_management, $vconsole_view, $vconsole_edit, $vconsole_management, $pandora_management);
@@ -579,14 +579,14 @@ sub pandora_create_profile ($$$$$$$$$$$$$$$$$$$$$$$$$) {
##########################################################################
#### Update profile.
###########################################################################
-sub pandora_update_profile ($$$$$$$$$$$$$$$$$$$$$$$$$) {
- my ($dbh, $profile_name, $incident_view,$incident_edit, $incident_management, $agent_view,
+sub pandora_update_profile ($$$$$$$$$$$$$$$$$$$$$$) {
+ my ($dbh, $profile_name, $agent_view,
$agent_edit, $agent_disable, $alert_edit, $alert_management, $user_management, $db_management,
$event_view, $event_edit, $event_management, $report_view, $report_edit, $report_management,
$map_view, $map_edit, $map_management, $vconsole_view, $vconsole_edit, $vconsole_management, $pandora_management) = @_;
- return db_update ($dbh, 'UPDATE tperfil SET incident_view = ?, incident_edit = ?, incident_management = ?, agent_view = ?, agent_edit = ?, agent_disable = ?, alert_edit = ?, alert_management = ?, user_management = ?, db_management = ?, event_view = ?, event_edit = ?, event_management = ?, report_view = ?, report_edit = ?, report_management = ?, map_view = ?, map_edit = ?, map_management = ?, vconsole_view = ?, vconsole_edit = ?, vconsole_management = ?, pandora_management = ? WHERE name=?;',
- $incident_view,$incident_edit, $incident_management, $agent_view,
+ return db_update ($dbh, 'UPDATE tperfil SET agent_view = ?, agent_edit = ?, agent_disable = ?, alert_edit = ?, alert_management = ?, user_management = ?, db_management = ?, event_view = ?, event_edit = ?, event_management = ?, report_view = ?, report_edit = ?, report_management = ?, map_view = ?, map_edit = ?, map_management = ?, vconsole_view = ?, vconsole_edit = ?, vconsole_management = ?, pandora_management = ? WHERE name=?;',
+ $agent_view,
$agent_edit, $agent_disable, $alert_edit, $alert_management, $user_management, $db_management,
$event_view, $event_edit, $event_management, $report_view, $report_edit, $report_management,
$map_view, $map_edit, $map_management, $vconsole_view, $vconsole_edit, $vconsole_management, $pandora_management, safe_input($profile_name));
@@ -4008,7 +4008,7 @@ sub cli_add_profile() {
##############################################################################
sub cli_create_profile() {
- my ($profile_name,$incident_view,$incident_edit,$incident_management,$agent_view,
+ my ($profile_name,$agent_view,
$agent_edit,$agent_disable,$alert_edit,$alert_management,$user_management,$db_management,
$event_view,$event_edit,$event_management,$report_view,$report_edit,$report_management,
$map_view,$map_edit,$map_management,$vconsole_view,$vconsole_edit,$vconsole_management,$pandora_management) = @ARGV[2..25];
@@ -4016,7 +4016,7 @@ sub cli_create_profile() {
my $id_profile = get_profile_id($dbh,$profile_name);
non_exist_check($id_profile,'profile',$profile_name);
- pandora_create_profile ($dbh, $profile_name, $incident_view, $incident_edit, $incident_management, $agent_view,
+ pandora_create_profile ($dbh, $profile_name, $agent_view,
$agent_edit, $agent_disable, $alert_edit, $alert_management, $user_management, $db_management,
$event_view, $event_edit, $event_management, $report_view, $report_edit, $report_management,
$map_view, $map_edit, $map_management, $vconsole_view, $vconsole_edit, $vconsole_management, $pandora_management);
@@ -4028,7 +4028,7 @@ sub cli_create_profile() {
##############################################################################
#
sub cli_update_profile() {
- my ($profile_name,$incident_view,$incident_edit,$incident_management,$agent_view,
+ my ($profile_name,$agent_view,
$agent_edit,$agent_disable,$alert_edit,$alert_management,$user_management,$db_management,
$event_view,$event_edit,$event_management,$report_view,$report_edit,$report_management,
$map_view,$map_edit,$map_management,$vconsole_view,$vconsole_edit,$vconsole_management,$pandora_management) = @ARGV[2..25];
@@ -4036,7 +4036,7 @@ sub cli_update_profile() {
my $id_profile = get_profile_id($dbh,$profile_name);
exist_check($id_profile,'profile',$profile_name);
- pandora_update_profile ($dbh, $profile_name, $incident_view, $incident_edit, $incident_management, $agent_view,
+ pandora_update_profile ($dbh, $profile_name, $agent_view,
$agent_edit, $agent_disable, $alert_edit, $alert_management, $user_management, $db_management,
$event_view, $event_edit, $event_management, $report_view, $report_edit, $report_management,
$map_view, $map_edit, $map_management, $vconsole_view, $vconsole_edit, $vconsole_management, $pandora_management);