diff --git a/pandora_console/godmode/wizards/ManageExtensions.class.php b/pandora_console/godmode/wizards/ManageExtensions.class.php index 856a53a04a..a1baba90bc 100644 --- a/pandora_console/godmode/wizards/ManageExtensions.class.php +++ b/pandora_console/godmode/wizards/ManageExtensions.class.php @@ -160,6 +160,16 @@ class ManageExtensions extends HTML public function run() { global $config; + + if (! check_acl($config['id_user'], 0, 'AR')) { + db_pandora_audit( + AUDIT_LOG_ACL_VIOLATION, + 'Trying to access Manage disco packages' + ); + include 'general/noaccess.php'; + return; + } + // Load styles. parent::run(); @@ -278,52 +288,54 @@ class ManageExtensions extends HTML $this->printHeader(true) ); - $table = new stdClass(); - $table->width = '100%'; - $table->class = 'databox filters'; - $table->size = []; - $table->size[0] = '80%'; - $table->align[3] = 'right'; - $table->data = []; - $table->data[0][0] = html_print_label_input_block( - __('Load DISCO'), - html_print_div( + if ((bool) check_acl($config['id_user'], 0, 'AW') === true) { + $table = new stdClass(); + $table->width = '100%'; + $table->class = 'databox filters'; + $table->size = []; + $table->size[0] = '80%'; + $table->align[3] = 'right'; + $table->data = []; + $table->data[0][0] = html_print_label_input_block( + __('Load DISCO'), + html_print_div( + [ + 'id' => 'upload_file', + 'content' => html_print_input_file( + 'file', + true, + ['style' => 'width:100%'] + ), + 'class' => 'mrgn_top_15px', + ], + true + ) + ); + $table->data[0][3] = html_print_submit_button( + __('Upload DISCO'), + 'upload_button', + false, [ - 'id' => 'upload_file', - 'content' => html_print_input_file( - 'file', - true, - ['style' => 'width:100%'] - ), - 'class' => 'mrgn_top_15px', + 'class' => 'sub ok float-right', + 'icon' => 'next', ], true - ) - ); - $table->data[0][3] = html_print_submit_button( - __('Upload DISCO'), - 'upload_button', - false, - [ - 'class' => 'sub ok float-right', - 'icon' => 'next', - ], - true - ); + ); - echo '
'; + } echo '