diff options
author | Simon Rettberg | 2022-06-10 11:33:58 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-06-10 11:33:58 +0200 |
commit | 677210edcba8bfbae9bfa5505ead88f1cdfd70aa (patch) | |
tree | bbc3015c83e2540bcf95da816fdd4221b320a7ce /modules-available/rebootcontrol/page.inc.php | |
parent | [minilinux] Add option to force another DHCP request in initramfs (diff) | |
download | slx-admin-677210edcba8bfbae9bfa5505ead88f1cdfd70aa.tar.gz slx-admin-677210edcba8bfbae9bfa5505ead88f1cdfd70aa.tar.xz slx-admin-677210edcba8bfbae9bfa5505ead88f1cdfd70aa.zip |
[rebootcontrol] Show error message if user has no action.* permission
Diffstat (limited to 'modules-available/rebootcontrol/page.inc.php')
-rw-r--r-- | modules-available/rebootcontrol/page.inc.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules-available/rebootcontrol/page.inc.php b/modules-available/rebootcontrol/page.inc.php index b84b4d9a..872f27d4 100644 --- a/modules-available/rebootcontrol/page.inc.php +++ b/modules-available/rebootcontrol/page.inc.php @@ -65,7 +65,13 @@ class Page_RebootControl extends Page if (Request::isPost()) { Util::redirect('?do=rebootcontrol' . ($section ? '&show=' . $section : '')); } elseif ($section === false) { - Util::redirect('?do=rebootcontrol&show=task'); + if (User::hasPermission('action.*')) { + Util::redirect('?do=rebootcontrol&show=task'); + } elseif (User::hasPermission('jumphost.*')) { + Util::redirect('?do=rebootcontrol&show=jumphost'); + } else { + Util::redirect('?do=rebootcontrol&show=subnet'); + } } } |