system: configdpRun() needs to be used #8221

In the group case that is a refactor, in the user case that
is a bugfix because the argument was not passed...
This commit is contained in:
Franco Fichtner 2025-01-17 10:34:09 +01:00
parent 672c3da6e6
commit d85bf8c0d8
2 changed files with 8 additions and 6 deletions

View File

@ -69,7 +69,7 @@ class GroupController extends ApiMutableModelControllerBase
$result = $this->addBase('group', 'group');
if ($result['result'] != 'failed') {
$data = $this->request->getPost(static::$internalModelName);
(new Backend())->configdRun('auth sync group ' . $data['name']);
(new Backend())->configdpRun('auth sync group', [$data['name']]);
}
return $result;
}
@ -79,7 +79,9 @@ class GroupController extends ApiMutableModelControllerBase
$result = $this->setBase('group', 'group', $uuid);
if ($result['result'] != 'failed') {
$data = $this->request->getPost(static::$internalModelName);
(new Backend())->configdRun('auth sync group ' . $data['name']);
if (!empty($data['name'])) {
(new Backend())->configdpRun('auth sync group', [$data['name']]);
}
}
return $result;
}
@ -99,7 +101,7 @@ class GroupController extends ApiMutableModelControllerBase
}
$result = $this->delBase('group', $uuid);
if ($groupname != null) {
(new Backend())->configdRun('auth sync group ' . $groupname);
(new Backend())->configdpRun('auth sync group', [$groupname]);
}
return $result;
}

View File

@ -155,7 +155,7 @@ class UserController extends ApiMutableModelControllerBase
if ($result['result'] != 'failed') {
$data = $this->request->getPost(static::$internalModelName);
if (!empty($data['name'])) {
(new Backend())->configdRun('auth sync user', [$data['name']]);
(new Backend())->configdpRun('auth sync user', [$data['name']]);
}
}
return $result;
@ -167,7 +167,7 @@ class UserController extends ApiMutableModelControllerBase
if ($result['result'] != 'failed') {
$data = $this->request->getPost(static::$internalModelName);
if (!empty($data['name'])) {
(new Backend())->configdRun('auth sync user', [$data['name']]);
(new Backend())->configdpRun('auth sync user', [$data['name']]);
}
}
return $result;
@ -196,7 +196,7 @@ class UserController extends ApiMutableModelControllerBase
}
$result = $this->delBase('user', $uuid);
if ($username != null) {
(new Backend())->configdRun('auth sync user', [$username]);
(new Backend())->configdpRun('auth sync user', [$username]);
}
return $result;
}