From c56bc651b9a784ccb48e568bba7538435b3295ed Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Wed, 18 Jan 2023 08:59:59 +0100 Subject: [PATCH] allow hiding documentation menu for customers via customers-hide-option; use --staging for acme.sh for every test-CA Signed-off-by: Michael Kaufmann --- actions/admin/settings/100.panel.php | 3 ++- lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php | 2 +- lib/config.example.inc.php | 8 +++++++- lib/navigation/00.froxlor.main.php | 1 + 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/actions/admin/settings/100.panel.php b/actions/admin/settings/100.panel.php index 75e2ac9e..b1ac1522 100644 --- a/actions/admin/settings/100.panel.php +++ b/actions/admin/settings/100.panel.php @@ -269,7 +269,8 @@ return [ 'traffic' => lng('menue.traffic.traffic'), 'traffic.http' => lng('menue.traffic.traffic') . " / HTTP", 'traffic.ftp' => lng('menue.traffic.traffic') . " / FTP", - 'traffic.mail' => lng('menue.traffic.traffic') . " / Mail" + 'traffic.mail' => lng('menue.traffic.traffic') . " / Mail", + 'misc.documentation' => lng('admin.documentation'), ], 'save_method' => 'storeSettingField', 'advanced_mode' => true diff --git a/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php b/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php index e6c37473..e44c0d35 100644 --- a/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php +++ b/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php @@ -557,7 +557,7 @@ EOC; if (Settings::Get('system.letsencryptreuseold') != '1') { $acmesh_cmd .= " --always-force-new-domain-key"; } - if (Settings::Get('system.letsencryptca') == 'letsencrypt_test') { + if (substr(Settings::Get('system.letsencryptca'), -5) == '_test') { $acmesh_cmd .= " --staging"; } if ($force) { diff --git a/lib/config.example.inc.php b/lib/config.example.inc.php index 26d1be34..7f34f735 100644 --- a/lib/config.example.inc.php +++ b/lib/config.example.inc.php @@ -4,5 +4,11 @@ * change the options below to either true or false */ return [ - 'enable_webupdate' => false + /** + * enable/disable the possibility to update froxlor from within the web-interface, + * recommended value for debian/ubuntu package users is false to rely on apt and not have version mixup. + * This is also useful for providers that manage the servers but give admin access to froxlor to handle + * updates the way the providers does it (e.g. automation, etc.) + */ + 'enable_webupdate' => false, ]; diff --git a/lib/navigation/00.froxlor.main.php b/lib/navigation/00.froxlor.main.php index 94a08198..d65819fb 100644 --- a/lib/navigation/00.froxlor.main.php +++ b/lib/navigation/00.froxlor.main.php @@ -158,6 +158,7 @@ return [ 'docs' => [ 'label' => lng('admin.documentation'), 'icon' => 'fa-solid fa-circle-info', + 'show_element' => (!Settings::IsInList('panel.customer_hide_options', 'misc.documentation')), 'elements' => [ [ 'url' => 'https://docs.froxlor.org/v2/user-guide/',