Skip to content

Commit

Permalink
Merge pull request #39537 from nextcloud/ocs-update-group
Browse files Browse the repository at this point in the history
`/ocs/v1.php/cloud/groups` `UPDATE` method - correct status when group not found
  • Loading branch information
bigcat88 committed Jul 27, 2023
2 parents 6b72217 + bd19cd6 commit b93f101
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 b93f101

Please sign in to comment.