mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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:
commit
e8ae4406ce
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue