From 44558ebd2e97421496e4639ea1fe405b87b5abd8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 1 Jul 2022 17:50:57 +0200 Subject: [rebootcontrol] Fix permission check --- modules-available/rebootcontrol/inc/rebootcontrol.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules-available/rebootcontrol') diff --git a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php index 94ac7665..36b2b14f 100644 --- a/modules-available/rebootcontrol/inc/rebootcontrol.inc.php +++ b/modules-available/rebootcontrol/inc/rebootcontrol.inc.php @@ -151,7 +151,7 @@ class RebootControl * @param string $command Command or script to execute on client * @param int $timeout in seconds * @param string|false $privkey SSH private key to use to connect - * @return array|false + * @return array|false task struct, false on error */ public static function runScript(array $clients, string $command, int $timeout = 5, $privkey = false) { @@ -451,9 +451,9 @@ class RebootControl public static function prepareExec() { - User::assertPermission('action.exec'); + User::assertPermission('.rebootcontrol.action.exec'); $uuids = array_values(Request::post('uuid', Request::REQUIRED, 'array')); - $machines = RebootUtils::getFilteredMachineList($uuids, 'action.exec'); + $machines = RebootUtils::getFilteredMachineList($uuids, '.rebootcontrol.action.exec'); if ($machines === false) return; $id = mt_rand(); -- cgit v1.2.3-55-g7522