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/pages/task.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/pages/task.inc.php')
-rw-r--r-- | modules-available/rebootcontrol/pages/task.inc.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules-available/rebootcontrol/pages/task.inc.php b/modules-available/rebootcontrol/pages/task.inc.php index 0e770618..933c7721 100644 --- a/modules-available/rebootcontrol/pages/task.inc.php +++ b/modules-available/rebootcontrol/pages/task.inc.php @@ -104,6 +104,9 @@ class SubPage Render::addTemplate('task-header'); // Append list of active reboot/shutdown tasks $allowedLocs = User::getAllowedLocations("action.*"); + if (empty($allowedLocs)) { + User::assertPermission('action.*'); + } $active = RebootControl::getActiveTasks($allowedLocs); if (empty($active)) { Message::addInfo('no-current-tasks'); |