Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-05-11 09:40:28 +0300
committerGitHub <noreply@github.com>2022-05-11 09:40:28 +0300
commit18f2340a403554cde825d673d6bd5aa31283b4e5 (patch)
tree68fe9d15327b8a41638b492f0c2fd5d2208739bc
parentda64a3a7e81972a98f0ad02bf944d1670f6965b8 (diff)
parentc714c3380af95cb5644f0a16d261d42222cdb9ba (diff)
Merge pull request #32149 from nextcloud/fix-transferring-groupfolders
-rw-r--r--apps/files/lib/Controller/TransferOwnershipController.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/lib/Controller/TransferOwnershipController.php b/apps/files/lib/Controller/TransferOwnershipController.php
index fb1a8b33dc1..5abd65444bf 100644
--- a/apps/files/lib/Controller/TransferOwnershipController.php
+++ b/apps/files/lib/Controller/TransferOwnershipController.php
@@ -30,6 +30,7 @@ namespace OCA\Files\Controller;
use OCA\Files\BackgroundJob\TransferOwnership;
use OCA\Files\Db\TransferOwnership as TransferOwnershipEntity;
use OCA\Files\Db\TransferOwnershipMapper;
+use OCP\Files\IHomeStorage;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
@@ -97,7 +98,7 @@ class TransferOwnershipController extends OCSController {
return new DataResponse([], Http::STATUS_BAD_REQUEST);
}
- if ($node->getOwner()->getUID() !== $this->userId) {
+ if ($node->getOwner()->getUID() !== $this->userId || !$node->getStorage()->instanceOfStorage(IHomeStorage::class)) {
return new DataResponse([], Http::STATUS_FORBIDDEN);
}