aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAlexander Piskun <13381981+bigcat88@users.noreply.github.com>2023-07-22 13:18:43 +0300
committerAlexander Piskun <bigcat88@icloud.com>2023-07-22 13:18:43 +0300
commitbd19cd6cf98e13c1e74c1742349c63b7c72f5937 (patch)
tree350efb82e470f8f43fdf8232825fff4f8ea451ae /apps
parentbbb082741759f8a97bd7e5a97d93e069189fa348 (diff)
downloadnextcloud-server-bd19cd6cf98e13c1e74c1742349c63b7c72f5937.tar.gz
nextcloud-server-bd19cd6cf98e13c1e74c1742349c63b7c72f5937.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();
}