diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2022-05-11 08:40:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-11 08:40:28 +0200 |
commit | 18f2340a403554cde825d673d6bd5aa31283b4e5 (patch) | |
tree | 68fe9d15327b8a41638b492f0c2fd5d2208739bc /apps/files/lib | |
parent | da64a3a7e81972a98f0ad02bf944d1670f6965b8 (diff) | |
parent | c714c3380af95cb5644f0a16d261d42222cdb9ba (diff) | |
download | nextcloud-server-18f2340a403554cde825d673d6bd5aa31283b4e5.tar.gz nextcloud-server-18f2340a403554cde825d673d6bd5aa31283b4e5.zip |
Merge pull request #32149 from nextcloud/fix-transferring-groupfolders
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Controller/TransferOwnershipController.php | 3 |
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); } |