aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVanessa Pertsch <vanessa.pertsch@nextcloud.com>2022-04-26 09:10:36 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-05-11 06:45:34 +0000
commit0722ee4a86508406b17062048802548b20fef595 (patch)
tree470cd285c56f4d65b7b4a04e6f2570599f246db0
parent4b97259401a16e068e2681c9448eb1fad2f72664 (diff)
downloadnextcloud-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.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);
}