diff --git a/pandora_console/godmode/modules/manage_nc_groups.php b/pandora_console/godmode/modules/manage_nc_groups.php index 16a9cccaad..c4ba21febc 100644 --- a/pandora_console/godmode/modules/manage_nc_groups.php +++ b/pandora_console/godmode/modules/manage_nc_groups.php @@ -46,14 +46,15 @@ if (defined('METACONSOLE')) { $sec = 'gmodules'; } - -$create = (bool) get_parameter('create'); -$update = (bool) get_parameter('update'); -$delete = (bool) get_parameter('delete'); -$new = (bool) get_parameter('new'); -$id = (int) get_parameter('id'); -$multiple_delete = (bool) get_parameter('multiple_delete', 0); -$pure = get_parameter('pure', 0); +if (is_management_allowed() === true) { + $create = (bool) get_parameter('create'); + $update = (bool) get_parameter('update'); + $delete = (bool) get_parameter('delete'); + $new = (bool) get_parameter('new'); + $id = (int) get_parameter('id'); + $multiple_delete = (bool) get_parameter('multiple_delete', 0); + $pure = get_parameter('pure', 0); +} if ($create) { $name = (string) get_parameter('name'); @@ -186,7 +187,7 @@ if ($multiple_delete) { ); } -if (($id || $new) && !$delete && !$multiple_delete) { +if (($id || $new) && !$delete && !$multiple_delete && is_management_allowed() === true) { include_once 'manage_nc_groups_form.php'; return; } @@ -229,7 +230,10 @@ $table->class = 'info_table'; $table->head = []; $table->head['checkbox'] = html_print_checkbox('all_delete', 0, false, true, false); $table->head[0] = __('Name'); -$table->head[1] = __('Action'); +if (is_management_allowed() === true) { + $table->head[1] = __('Action'); +} + $table->style = []; $table->style[0] = 'font-weight: bold'; $table->align = []; @@ -258,31 +262,42 @@ foreach ($groups as $group) { } $table->cellclass[][1] = 'action_buttons'; - $data[1] = "".html_print_image('images/cross.png', true, ['title' => __('Delete')]).''; + } array_push($table->data, $data); } +if (is_management_allowed() === false) { + ui_print_warning_message(__('This node is configured with centralized mode. This page is for read only. Go to metaconsole to manage the component groups.')); +} + if (isset($data)) { echo "
'; } else { ui_print_info_message(['no_close' => true, 'message' => __('There are no defined component groups') ]); } +if (is_management_allowed() === true) { + echo ''; +} -echo ''; enterprise_hook('close_meta_frame'); ?>