diff options
author | Julien Veyssier <julien-nc@posteo.net> | 2023-07-31 18:21:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-31 18:21:29 +0200 |
commit | 3b5489ae891b686b4294a8c18c06a536fece8ad7 (patch) | |
tree | 03eeb8766f791cae313e86aa1f1dcc203f30a16e | |
parent | 8cb59d3457b231c766916d7652deaedc9cf3d9ed (diff) | |
parent | d1260b833de3d1e4cbc1b2a28b7f20a24786df79 (diff) | |
download | nextcloud-server-3b5489ae891b686b4294a8c18c06a536fece8ad7.tar.gz nextcloud-server-3b5489ae891b686b4294a8c18c06a536fece8ad7.zip |
Merge pull request #39601 from nextcloud/backport/39537/stable27
[stable27] `/ocs/v1.php/cloud/groups` `UPDATE` method - correct status when group not found
-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(); } |