summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol
diff options
context:
space:
mode:
authorSimon Rettberg2022-07-01 17:50:57 +0200
committerSimon Rettberg2022-07-01 17:50:57 +0200
commit44558ebd2e97421496e4639ea1fe405b87b5abd8 (patch)
treea11535849dc079bd70df74d0a423ac8c3ec0f7ac /modules-available/rebootcontrol
parent[inc/Session] Add call to save session data (diff)
downloadslx-admin-44558ebd2e97421496e4639ea1fe405b87b5abd8.tar.gz
slx-admin-44558ebd2e97421496e4639ea1fe405b87b5abd8.tar.xz
slx-admin-44558ebd2e97421496e4639ea1fe405b87b5abd8.zip
[rebootcontrol] Fix permission check
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r--modules-available/rebootcontrol/inc/rebootcontrol.inc.php6
1 files changed, 3 insertions, 3 deletions
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();