diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index bbdd17841e..121828de32 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -797,11 +797,7 @@ foreach ($commands as $command) { // (IMPORTANT, DO NOT CHANGE!) only users with permissions over "All" group have access to edition of commands belonging to "All" group. if ($is_management_allowed === true && !$command['internal'] && check_acl_restricted_all($config['id_user'], $command['id_group'], 'LM')) { - if (check_acl($config['id_user'], 0, 'PM') || is_user_admin( - $config['id_user - '] - ) - ) { + if (is_user_admin($config['id_user']) === true) { $data['action'] = ''; $data['action'] .= ''.html_print_image('images/copy.png', true, ['class' => 'invert_filter']).''; @@ -828,7 +824,8 @@ if (isset($data) === true && count($table->data) > 0) { ); } -if ($is_management_allowed === true && check_acl_restricted_all($config['id_user'], $command['id_group'], 'PM')) { +// Commands can only be created by the super administrator. +if (users_is_admin() === true) { echo '
'; echo '
'; html_print_submit_button(__('Create'), 'create', false, 'class="sub next"');