diff options
author | Vanessa Pertsch <vanessa.pertsch@nextcloud.com> | 2022-04-26 09:10:36 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-05-11 06:45:34 +0000 |
commit | 0722ee4a86508406b17062048802548b20fef595 (patch) | |
tree | 470cd285c56f4d65b7b4a04e6f2570599f246db0 | |
parent | 4b97259401a16e068e2681c9448eb1fad2f72664 (diff) | |
download | nextcloud-server-0722ee4a86508406b17062048802548b20fef595.tar.gz nextcloud-server-0722ee4a86508406b17062048802548b20fef595.zip |
fix for transferring ownership of groupfolders
Signed-off-by: Vanessa Pertsch <vanessa.pertsch@nextcloud.com>
-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); } |