From c6877154fbf45e8ea245a0cfd8e7ce2c297733f5 Mon Sep 17 00:00:00 2001 From: Daniel Barbero Martin Date: Wed, 16 Jun 2021 17:26:19 +0200 Subject: [PATCH] Wip command center, Plugins in meta --- pandora_console/godmode/servers/plugin.php | 25 +------------------ .../godmode/servers/plugin_registration.php | 2 +- pandora_console/include/functions_config.php | 6 ----- 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 4ad3d609bc..e519581838 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -112,7 +112,6 @@ $edit_file = get_parameter('edit_file', false); $update_file = get_parameter('update_file', false); $plugin_command = get_parameter('plugin_command', ''); $tab = get_parameter('tab', ''); -$deploy_plugin = get_parameter('deploy_plugin', 0); if ($view != '') { $form_id = $view; @@ -826,19 +825,7 @@ if (($create != '') || ($view != '')) { } } - if ($deploy_plugin) { - if (is_metaconsole()) { - enterprise_include_once('include/functions_plugins.php'); - $result = plugins_deploy_plugin($deploy_plugin); - if (!$result) { - ui_print_error_message(__('Problem deploying plugin')); - } else { - ui_print_success_message(__('Plugin deployed successfully')); - } - } - } - - // If not edition or insert, then list available plugins + // If not edition or insert, then list available plugins. $rows = db_get_all_rows_sql('SELECT * FROM tplugin ORDER BY name'); if ($rows !== false) { @@ -926,16 +913,6 @@ if (($create != '') || ($view != '')) { 'class' => 'invert_filter', ] ).''; - if (is_metaconsole()) { - echo "   ".html_print_image( - 'images/deploy.png', - true, - [ - 'title' => __('Deploy'), - 'width' => '21 px', - ] - ).'  '; - } echo ''; } diff --git a/pandora_console/godmode/servers/plugin_registration.php b/pandora_console/godmode/servers/plugin_registration.php index befeeff0d7..7c8403d33f 100644 --- a/pandora_console/godmode/servers/plugin_registration.php +++ b/pandora_console/godmode/servers/plugin_registration.php @@ -33,7 +33,7 @@ global $config; check_login(); if ((bool) check_acl($config['id_user'], 0, 'PM') === false - && (bool) check_acl($config['id_user'], 0, 'AW') === false + || (bool) check_acl($config['id_user'], 0, 'AW') === false ) { db_pandora_audit( 'ACL Violation', diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 6544b42b79..3ca7c2d73d 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -3251,12 +3251,6 @@ function config_process_config() config_update_value('ehorus_req_timeout', 5); } - if (is_metaconsole() === true) { - if (!isset($config['metaconsole_deploy_inventory_plugin'])) { - config_update_value('metaconsole_deploy_inventory_plugin', 0); - } - } - // Integria. if (!isset($config['integria_user_level_conf'])) { config_update_value('integria_user_level_conf', 0);