Skip to content

Commit

Permalink
Merge pull request #39601 from nextcloud/backport/39537/stable27
Browse files Browse the repository at this point in the history
[stable27] `/ocs/v1.php/cloud/groups` `UPDATE` method - correct status when group not found
  • Loading branch information
julien-nc authored Jul 31, 2023
2 parents 8cb59d3 + d1260b8 commit 3b5489a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/provisioning_api/lib/Controller/GroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ public function updateGroup(string $groupId, string $key, string $value): DataRe

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();
}
Expand Down

0 comments on commit 3b5489a

Please sign in to comment.