Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix for transferring ownership of groupfolders
Signed-off-by: Vanessa Pertsch <[email protected]>
  • Loading branch information
vanpertsch authored and backportbot-nextcloud[bot] committed May 11, 2022
commit 608fc82fd4634ba10bd40a24390c4cf204ba9b85
3 changes: 2 additions & 1 deletion apps/files/lib/Controller/TransferOwnershipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
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;
Expand Down Expand Up @@ -97,7 +98,7 @@ public function transfer(string $recipient, string $path): DataResponse {
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);
}

Expand Down