From 4b753695979d44cb8ef2d9da4b16f897729b0128 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sat, 2 Sep 2023 15:53:15 +0200 Subject: [PATCH] only check non-admin resources if user is not an admin in navigation Signed-off-by: Michael Kaufmann --- lib/navigation/00.froxlor.main.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/navigation/00.froxlor.main.php b/lib/navigation/00.froxlor.main.php index f322fe8568..9863ce5441 100644 --- a/lib/navigation/00.froxlor.main.php +++ b/lib/navigation/00.froxlor.main.php @@ -38,7 +38,7 @@ 'url' => 'customer_email.php?page=emails', 'label' => lng('menue.email.emails'), 'required_resources' => 'emails', - 'add_shortlink' => CurrentUser::canAddResource('emails') ? 'customer_email.php?page=email_domain&action=add' : null, + 'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('emails') ? 'customer_email.php?page=email_domain&action=add' : null, ], [ 'url' => Settings::Get('panel.webmail_url'), @@ -60,7 +60,7 @@ 'url' => 'customer_mysql.php?page=mysqls', 'label' => lng('menue.mysql.databases'), 'required_resources' => 'mysqls', - 'add_shortlink' => CurrentUser::canAddResource('mysqls')? 'customer_mysql.php?page=mysqls&action=add' : null, + 'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('mysqls')? 'customer_mysql.php?page=mysqls&action=add' : null, ], [ 'url' => Settings::Get('panel.phpmyadmin_url'), @@ -81,7 +81,7 @@ [ 'url' => 'customer_domains.php?page=domains', 'label' => lng('menue.domains.settings'), - 'add_shortlink' => CurrentUser::canAddResource('subdomains') ? 'customer_domains.php?page=domains&action=add' : null, + 'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('subdomains') ? 'customer_domains.php?page=domains&action=add' : null, ], [ 'url' => 'customer_domains.php?page=sslcertificates', @@ -98,7 +98,7 @@ [ 'url' => 'customer_ftp.php?page=accounts', 'label' => lng('menue.ftp.accounts'), - 'add_shortlink' => CurrentUser::canAddResource('ftps') ? 'customer_ftp.php?page=accounts&action=add' : null, + 'add_shortlink' => !CurrentUser::isAdmin() && CurrentUser::canAddResource('ftps') ? 'customer_ftp.php?page=accounts&action=add' : null, ], [ 'url' => Settings::Get('panel.webftp_url'),