diff options
author | Alexander Piskun <13381981+bigcat88@users.noreply.github.com> | 2023-07-22 13:18:43 +0300 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-07-27 18:17:32 +0000 |
commit | 4943a4668a8ed80d98f61ba299054ee3a63568de (patch) | |
tree | 192d624f4865dd5ded5e0b599750826353b2b9ee /apps | |
parent | 81d8d324e1eb8281fafb97e67f4f492a9da27fa6 (diff) | |
download | nextcloud-server-4943a4668a8ed80d98f61ba299054ee3a63568de.tar.gz nextcloud-server-4943a4668a8ed80d98f61ba299054ee3a63568de.zip |
to return correct code when group not found
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/provisioning_api/lib/Controller/GroupsController.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index e7e2a666b7b..46de5395a65 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -271,6 +271,9 @@ class GroupsController extends AUserData { if ($key === 'displayname') { $group = $this->groupManager->get($groupId); + if ($group === null) { + throw new OCSException('Group does not exist', OCSController::RESPOND_NOT_FOUND); + } if ($group->setDisplayName($value)) { return new DataResponse(); } |