Merge pull request #34849 from nextcloud/feat/hint-about-no-access-reasons

Add an hint about reasons why files can't be accessed
This commit is contained in:
Carl Schwan 2022-11-25 13:12:55 +01:00 committed by GitHub
commit e8ae4406ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,7 +255,11 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node implements \Sabre\DAV\ICol
if (!$this->info->isReadable()) {
// return 403 instead of 404 because a 404 would make
// the caller believe that the collection itself does not exist
throw new Forbidden('No read permissions');
if (\OCP\Server::get(\OCP\App\IAppManager::class)->isInstalled('files_accesscontrol')) {
throw new Forbidden('No read permissions. This might be caused by files_accesscontrol, check your configured rules');
} else {
throw new Forbidden('No read permissions');
}
}
$folderContent = $this->getNode()->getDirectoryListing();
} catch (LockedException $e) {