Merge pull request #16624 from nextcloud/bugfix/noid/versions-fetch-owner-only
Make sure we only fetch the file by id for the actual owner
This commit is contained in:
commit
8e59132255
|
@ -183,7 +183,7 @@ class Storage {
|
|||
$eventDispatcher = \OC::$server->getEventDispatcher();
|
||||
$fileInfo = $files_view->getFileInfo($filename);
|
||||
$id = $fileInfo->getId();
|
||||
$nodes = \OC::$server->getRootFolder()->getById($id);
|
||||
$nodes = \OC::$server->getRootFolder()->getUserFolder($uid)->getById($id);
|
||||
foreach ($nodes as $node) {
|
||||
$event = new CreateVersionEvent($node);
|
||||
$eventDispatcher->dispatch('OCA\Files_Versions::createVersion', $event);
|
||||
|
|
Loading…
Reference in New Issue