Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/31843/head
Robin Appelman 3 years ago
parent ae7205f550
commit 5e69f98c16
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
  1. 13
      apps/dav/lib/Connector/Sabre/SharesPlugin.php
  2. 24
      lib/private/Files/View.php

@ -201,18 +201,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
!is_null($propFind->getStatus(self::SHAREES_PROPERTYNAME))
)
) {
try {
$folderNode = $sabreNode->getNode();
} catch (NotFoundException $e) {
// If the folder can't be properly found just return
return;
}
if (!($folderNode instanceof Folder)) {
// Safety check
return;
}
$folderNode = $sabreNode->getNode();
$this->cachedFolders[] = $sabreNode->getPath();
$childShares = $this->getSharesFolder($folderNode);
foreach ($childShares as $id => $shares) {

@ -1449,21 +1449,21 @@ class View {
$cache = $storage->getCache($internalPath);
$user = \OC_User::getUser();
if (!$directoryInfo) {
$data = $this->getCacheEntry($storage, $internalPath, $directory);
if (!$data instanceof ICacheEntry || !isset($data['fileid'])) {
return [];
}
} else {
$data = $directoryInfo;
}
if (!($data->getPermissions() & Constants::PERMISSION_READ)) {
if (!$directoryInfo) {
$data = $this->getCacheEntry($storage, $internalPath, $directory);
if (!$data instanceof ICacheEntry || !isset($data['fileid'])) {
return [];
}
} else {
$data = $directoryInfo;
}
if (!($data->getPermissions() & Constants::PERMISSION_READ)) {
return [];
}
$folderId = $data->getId();
$contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
$folderId = $data->getId();
$contents = $cache->getFolderContentsById($folderId); //TODO: mimetype_filter
$sharingDisabled = \OCP\Util::isSharingDisabledForUser();

Loading…
Cancel
Save