diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master index 81f6bba553cc64f751afacfe271e775717c30fbb..d6dfa18f47f61ed5598c56edb8d6bc81f15732c0 100644 --- a/install/tpl/system.ini.master +++ b/install/tpl/system.ini.master @@ -35,6 +35,7 @@ client_username_web_check_disabled=n backups_include_into_web_quota=n reseller_can_use_options=n web_php_options=no,fast-cgi,mod,php-fpm +show_aps_menu=n [tools] diff --git a/interface/web/sites/lib/module.conf.php b/interface/web/sites/lib/module.conf.php index a9aefad9675cc3a8b52f6e45b569e1149b796384..775a704873ef4b2239f6c4e5f06b2cd691c269d8 100644 --- a/interface/web/sites/lib/module.conf.php +++ b/interface/web/sites/lib/module.conf.php @@ -157,33 +157,37 @@ if($app->auth->get_client_limit($userid, 'shell_user') != 0 or $app->auth->get_c } // APS menu -if($app->auth->get_client_limit($userid, 'aps') != 0) -{ - $items = array(); - - $items[] = array( 'title' => 'Available packages', - 'target' => 'content', - 'link' => 'sites/aps_availablepackages_list.php', - 'html_id' => 'aps_availablepackages_list'); - - $items[] = array( 'title' => 'Installed packages', - 'target' => 'content', - 'link' => 'sites/aps_installedpackages_list.php', - 'html_id' => 'aps_installedpackages_list'); - - - // Second menu group, available only for admins - if($_SESSION['s']['user']['typ'] == 'admin') - { - $items[] = array( 'title' => 'Update Packagelist', - 'target' => 'content', - 'link' => 'sites/aps_update_packagelist.php', - 'html_id' => 'aps_packagedetails_show'); - } - - $module['nav'][] = array( 'title' => 'APS Installer', - 'open' => 1, - 'items' => $items); +if($app->auth->get_client_limit($userid, 'aps') != 0) { + // read web config + $app->uses('getconf'); + $global_config = $app->getconf->get_global_config('sites'); + if($global_config['show_aps_menu'] == 'y') { + $items = array(); + + $items[] = array( 'title' => 'Available packages', + 'target' => 'content', + 'link' => 'sites/aps_availablepackages_list.php', + 'html_id' => 'aps_availablepackages_list'); + + $items[] = array( 'title' => 'Installed packages', + 'target' => 'content', + 'link' => 'sites/aps_installedpackages_list.php', + 'html_id' => 'aps_installedpackages_list'); + + + // Second menu group, available only for admins + if($_SESSION['s']['user']['typ'] == 'admin') + { + $items[] = array( 'title' => 'Update Packagelist', + 'target' => 'content', + 'link' => 'sites/aps_update_packagelist.php', + 'html_id' => 'aps_packagedetails_show'); + } + + $module['nav'][] = array( 'title' => 'APS Installer', + 'open' => 1, + 'items' => $items); + } } // Statistics menu