From 677210edcba8bfbae9bfa5505ead88f1cdfd70aa Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 10 Jun 2022 11:33:58 +0200 Subject: [rebootcontrol] Show error message if user has no action.* permission --- modules-available/rebootcontrol/page.inc.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules-available/rebootcontrol/page.inc.php') 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'); + } } } -- cgit v1.2.3-55-g7522