Skip to content
Snippets Groups Projects
Commit bad49e15 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'hide-aps' into 'stable-3.1'

Hide APS menu

See merge request ispconfig/ispconfig3!1078
parents cf865a97 e39688e4
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ client_username_web_check_disabled=n ...@@ -35,6 +35,7 @@ client_username_web_check_disabled=n
backups_include_into_web_quota=n backups_include_into_web_quota=n
reseller_can_use_options=n reseller_can_use_options=n
web_php_options=no,fast-cgi,mod,php-fpm web_php_options=no,fast-cgi,mod,php-fpm
show_aps_menu=n
[tools] [tools]
......
...@@ -157,33 +157,37 @@ if($app->auth->get_client_limit($userid, 'shell_user') != 0 or $app->auth->get_c ...@@ -157,33 +157,37 @@ if($app->auth->get_client_limit($userid, 'shell_user') != 0 or $app->auth->get_c
} }
// APS menu // APS menu
if($app->auth->get_client_limit($userid, 'aps') != 0) if($app->auth->get_client_limit($userid, 'aps') != 0) {
{ // read web config
$items = array(); $app->uses('getconf');
$global_config = $app->getconf->get_global_config('sites');
$items[] = array( 'title' => 'Available packages', if($global_config['show_aps_menu'] == 'y') {
'target' => 'content', $items = array();
'link' => 'sites/aps_availablepackages_list.php',
'html_id' => 'aps_availablepackages_list'); $items[] = array( 'title' => 'Available packages',
'target' => 'content',
$items[] = array( 'title' => 'Installed packages', 'link' => 'sites/aps_availablepackages_list.php',
'target' => 'content', 'html_id' => 'aps_availablepackages_list');
'link' => 'sites/aps_installedpackages_list.php',
'html_id' => 'aps_installedpackages_list'); $items[] = array( 'title' => 'Installed packages',
'target' => 'content',
'link' => 'sites/aps_installedpackages_list.php',
// Second menu group, available only for admins 'html_id' => 'aps_installedpackages_list');
if($_SESSION['s']['user']['typ'] == 'admin')
{
$items[] = array( 'title' => 'Update Packagelist', // Second menu group, available only for admins
'target' => 'content', if($_SESSION['s']['user']['typ'] == 'admin')
'link' => 'sites/aps_update_packagelist.php', {
'html_id' => 'aps_packagedetails_show'); $items[] = array( 'title' => 'Update Packagelist',
} 'target' => 'content',
'link' => 'sites/aps_update_packagelist.php',
$module['nav'][] = array( 'title' => 'APS Installer', 'html_id' => 'aps_packagedetails_show');
'open' => 1, }
'items' => $items);
$module['nav'][] = array( 'title' => 'APS Installer',
'open' => 1,
'items' => $items);
}
} }
// Statistics menu // Statistics menu
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment