Skip to content

Commit

Permalink
Merge pull request #39600 from nextcloud/backport/39537/stable26
Browse files Browse the repository at this point in the history
[stable26] `/ocs/v1.php/cloud/groups` `UPDATE` method - correct status when group not found
  • Loading branch information
bigcat88 committed Jul 28, 2023
2 parents 1313984 + 4943a46 commit 0ce67e9
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 0ce67e9

Please sign in to comment.