Skip to content

Commit 317b24b

Browse files
committed
fix for transferring ownership of groupfolders
Signed-off-by: Vanessa Pertsch <vanessa.pertsch@nextcloud.com>
1 parent 8e29e81 commit 317b24b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/files/lib/Controller/TransferOwnershipController.php

Lines changed: 2 additions & 2 deletions
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;
@@ -40,7 +41,6 @@
4041
use OCP\IRequest;
4142
use OCP\IUserManager;
4243
use OCP\Notification\IManager as NotificationManager;
43-
4444
class TransferOwnershipController extends OCSController {
4545

4646
/** @var string */
@@ -97,7 +97,7 @@ public function transfer(string $recipient, string $path): DataResponse {
9797
return new DataResponse([], Http::STATUS_BAD_REQUEST);
9898
}
9999

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

0 commit comments

Comments
 (0)