mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 08:25:56 -04:00
Merge pull request #32330 from nextcloud/backport/32149/stable23
[stable23] fix for transferring ownership of groupfolders
This commit is contained in:
commit
3b566d8887
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue