aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Controller/TransferOwnershipController.php
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2023-07-12 10:50:59 +0200
committerGitHub <noreply@github.com>2023-07-12 10:50:59 +0200
commit706c141fffce928d344fe2f039da549fad065393 (patch)
tree8c9901da6df6bfd1754dfed7a7f680c2e4448719 /apps/files/lib/Controller/TransferOwnershipController.php
parent329d14264f44a3c4df16b65083c54f2986245e52 (diff)
parent259264b966b3fde0cfcfb44e8047206c58917268 (diff)
downloadnextcloud-server-706c141fffce928d344fe2f039da549fad065393.tar.gz
nextcloud-server-706c141fffce928d344fe2f039da549fad065393.zip
Merge pull request #39327 from nextcloud/feature/openapi/files
files: Add OpenAPI spec
Diffstat (limited to 'apps/files/lib/Controller/TransferOwnershipController.php')
-rw-r--r--apps/files/lib/Controller/TransferOwnershipController.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/TransferOwnershipController.php b/apps/files/lib/Controller/TransferOwnershipController.php
index 5abd65444bf..ce68b28349e 100644
--- a/apps/files/lib/Controller/TransferOwnershipController.php
+++ b/apps/files/lib/Controller/TransferOwnershipController.php
@@ -82,6 +82,17 @@ class TransferOwnershipController extends OCSController {
/**
* @NoAdminRequired
+ *
+ * Transfer the ownership to another user
+ *
+ * @param string $recipient Username of the recipient
+ * @param string $path Path of the file
+ *
+ * @return DataResponse<Http::STATUS_OK|Http::STATUS_BAD_REQUEST|Http::STATUS_FORBIDDEN, array<empty>, array{}>
+ *
+ * 200: Ownership transferred successfully
+ * 400: Transferring ownership is not possible
+ * 403: Transferring ownership is not allowed
*/
public function transfer(string $recipient, string $path): DataResponse {
$recipientUser = $this->userManager->get($recipient);
@@ -127,6 +138,16 @@ class TransferOwnershipController extends OCSController {
/**
* @NoAdminRequired
+ *
+ * Accept an ownership transfer
+ *
+ * @param int $id ID of the ownership transfer
+ *
+ * @return DataResponse<Http::STATUS_OK|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND, array<empty>, array{}>
+ *
+ * 200: Ownership transfer accepted successfully
+ * 403: Accepting ownership transfer is not allowed
+ * 404: Ownership transfer not found
*/
public function accept(int $id): DataResponse {
try {
@@ -160,6 +181,16 @@ class TransferOwnershipController extends OCSController {
/**
* @NoAdminRequired
+ *
+ * Reject an ownership transfer
+ *
+ * @param int $id ID of the ownership transfer
+ *
+ * @return DataResponse<Http::STATUS_OK|Http::STATUS_FORBIDDEN|Http::STATUS_NOT_FOUND, array<empty>, array{}>
+ *
+ * 200: Ownership transfer rejected successfully
+ * 403: Rejecting ownership transfer is not allowed
+ * 404: Ownership transfer not found
*/
public function reject(int $id): DataResponse {
try {