summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAlexander Piskun <13381981+bigcat88@users.noreply.github.com>2023-07-22 13:18:43 +0300
committerJulien Veyssier <julien-nc@posteo.net>2023-07-31 15:36:06 +0200
commitd1260b833de3d1e4cbc1b2a28b7f20a24786df79 (patch)
tree03eeb8766f791cae313e86aa1f1dcc203f30a16e /apps
parent8cb59d3457b231c766916d7652deaedc9cf3d9ed (diff)
downloadnextcloud-server-d1260b833de3d1e4cbc1b2a28b7f20a24786df79.tar.gz
nextcloud-server-d1260b833de3d1e4cbc1b2a28b7f20a24786df79.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.php3
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();
}