diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2022-05-16 12:49:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 12:49:41 +0200 |
commit | e501c2eb9d5369a2420a88965adb673080983a46 (patch) | |
tree | 3fd7cead801c465cce29e3833361d4d78ee67c57 | |
parent | 876d93ccf10ba670d8796914896ef12ae70777e5 (diff) | |
parent | d569c2fb25ac8af576b8d3f02288c55155e2a1cd (diff) | |
download | nextcloud-server-e501c2eb9d5369a2420a88965adb673080983a46.tar.gz nextcloud-server-e501c2eb9d5369a2420a88965adb673080983a46.zip |
Merge pull request #32331 from nextcloud/backport/32149/stable22
[stable22] fix for transferring ownership of groupfolders
-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); } |