Skip to content

Commit c714c33

Browse files
committed
fix for transferring ownership of groupfolders
Signed-off-by: Vanessa Pertsch <[email protected]>
1 parent f0f2a07 commit c714c33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/files/lib/Controller/TransferOwnershipController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use OCA\Files\BackgroundJob\TransferOwnership;
3131
use OCA\Files\Db\TransferOwnership as TransferOwnershipEntity;
3232
use OCA\Files\Db\TransferOwnershipMapper;
33+
use OCP\Files\IHomeStorage;
3334
use OCP\AppFramework\Db\DoesNotExistException;
3435
use OCP\AppFramework\Http;
3536
use OCP\AppFramework\Http\DataResponse;
@@ -97,7 +98,7 @@ public function transfer(string $recipient, string $path): DataResponse {
9798
return new DataResponse([], Http::STATUS_BAD_REQUEST);
9899
}
99100

100-
if ($node->getOwner()->getUID() !== $this->userId) {
101+
if ($node->getOwner()->getUID() !== $this->userId || !$node->getStorage()->instanceOfStorage(IHomeStorage::class)) {
101102
return new DataResponse([], Http::STATUS_FORBIDDEN);
102103
}
103104

0 commit comments

Comments
 (0)