diff options
Diffstat (limited to 'apps/provisioning_api/lib/Controller/GroupsController.php')
-rw-r--r-- | apps/provisioning_api/lib/Controller/GroupsController.php | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/GroupsController.php b/apps/provisioning_api/lib/Controller/GroupsController.php index 7c4447ac4eb..72285f55192 100644 --- a/apps/provisioning_api/lib/Controller/GroupsController.php +++ b/apps/provisioning_api/lib/Controller/GroupsController.php @@ -129,7 +129,7 @@ class GroupsController extends AUserData { * * @param string $groupId * @return DataResponse - * @throws OCSException + * @throws OCSException * * @deprecated 14 Use getGroupUsers */ @@ -252,6 +252,28 @@ class GroupsController extends AUserData { * @PasswordConfirmationRequired * * @param string $groupId + * @param string $key + * @param string $value + * @return DataResponse + * @throws OCSException + */ + public function updateGroup(string $groupId, string $key, string $value): DataResponse { + if ($key === 'displayname') { + $group = $this->groupManager->get($groupId); + if ($group->setDisplayName($value)) { + return new DataResponse(); + } + + throw new OCSException('Not supported by backend', 101); + } else { + throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED); + } + } + + /** + * @PasswordConfirmationRequired + * + * @param string $groupId * @return DataResponse * @throws OCSException */ |