Don't allow access to update manager offline in community edition - #4484
This commit is contained in:
parent
21c81f6dfe
commit
77f57ae87f
|
@ -31,6 +31,11 @@ global $config;
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
|
|
||||||
|
if (!enterprise_installed()) {
|
||||||
|
include 'general/noaccess.php';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
if (! check_acl($config['id_user'], 0, 'PM')
|
if (! check_acl($config['id_user'], 0, 'PM')
|
||||||
&& ! is_user_admin($config['id_user'])
|
&& ! is_user_admin($config['id_user'])
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -30,19 +30,21 @@ if ($php_version_array[0] < 7) {
|
||||||
|
|
||||||
$tab = get_parameter('tab', 'online');
|
$tab = get_parameter('tab', 'online');
|
||||||
|
|
||||||
$buttons = [
|
$buttons['setup'] = [
|
||||||
'setup' => [
|
'active' => ($tab == 'setup') ? true : false,
|
||||||
'active' => ($tab == 'setup') ? true : false,
|
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options')]).'</a>',
|
||||||
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=setup">'.html_print_image('images/gm_setup.png', true, ['title' => __('Options')]).'</a>',
|
];
|
||||||
],
|
|
||||||
'offline' => [
|
if (enterprise_installed()) {
|
||||||
|
$buttons['offline'] = [
|
||||||
'active' => ($tab == 'offline') ? true : false,
|
'active' => ($tab == 'offline') ? true : false,
|
||||||
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager')]).'</a>',
|
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=offline">'.html_print_image('images/box.png', true, ['title' => __('Offline update manager')]).'</a>',
|
||||||
],
|
];
|
||||||
'online' => [
|
}
|
||||||
'active' => ($tab == 'online') ? true : false,
|
|
||||||
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager')]).'</a>',
|
$buttons['online'] = [
|
||||||
],
|
'active' => ($tab == 'online') ? true : false,
|
||||||
|
'text' => '<a href="index.php?sec=gsetup&sec2=godmode/update_manager/update_manager&tab=online">'.html_print_image('images/op_gis.png', true, ['title' => __('Online update manager')]).'</a>',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue