Merge pull request #39600 from nextcloud/backport/39537/stable26

[stable26] `/ocs/v1.php/cloud/groups` `UPDATE` method - correct status when group not found
This commit is contained in:
Alexander Piskun 2023-07-28 20:42:11 +03:00 committed by GitHub
commit 0ce67e9091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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