diff options
author | Vanessa Pertsch <vanessa.pertsch@nextcloud.com> | 2022-04-26 09:10:36 +0200 |
---|---|---|
committer | Vanessa Pertsch <vanessa.pertsch@nextcloud.com> | 2022-05-10 16:54:22 +0200 |
commit | c714c3380af95cb5644f0a16d261d42222cdb9ba (patch) | |
tree | 6b0b1d836e354359bd56683e2a47523925f7760d /apps/files | |
parent | f0f2a07f850af1105e27be5bc9180500b1dbac39 (diff) | |
download | nextcloud-server-c714c3380af95cb5644f0a16d261d42222cdb9ba.tar.gz nextcloud-server-c714c3380af95cb5644f0a16d261d42222cdb9ba.zip |
fix for transferring ownership of groupfolders
Signed-off-by: Vanessa Pertsch <vanessa.pertsch@nextcloud.com>
Diffstat (limited to 'apps/files')
-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); } |