diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-05-10 09:31:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-10 09:31:19 +0200 |
commit | 48034bdc4a21aced21373f4871a28498b7ff0bff (patch) | |
tree | 39b11e37cec633c01422da69cfa6b56c254ecab3 /apps/files_trashbin | |
parent | 01c21601e81613b7c4163dbd575456752f70120e (diff) | |
parent | 17f1653ceb2971ff74055934cde33d4f2452d067 (diff) | |
download | nextcloud-server-48034bdc4a21aced21373f4871a28498b7ff0bff.tar.gz nextcloud-server-48034bdc4a21aced21373f4871a28498b7ff0bff.zip |
Merge pull request #9427 from nextcloud/bugfix/noid/no_listing_if_not_in_debug_trash_version
If not in debug disable principal listing
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/lib/Sabre/RootCollection.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Sabre/RootCollection.php b/apps/files_trashbin/lib/Sabre/RootCollection.php index e425fb448e2..be31d200f71 100644 --- a/apps/files_trashbin/lib/Sabre/RootCollection.php +++ b/apps/files_trashbin/lib/Sabre/RootCollection.php @@ -23,14 +23,17 @@ declare(strict_types=1); */ namespace OCA\Files_Trashbin\Sabre; +use OCP\IConfig; use Sabre\DAV\INode; use Sabre\DAVACL\AbstractPrincipalCollection; use Sabre\DAVACL\PrincipalBackend; class RootCollection extends AbstractPrincipalCollection { - public function __construct(PrincipalBackend\BackendInterface $principalBackend) { + public function __construct(PrincipalBackend\BackendInterface $principalBackend, IConfig $config) { parent::__construct($principalBackend, 'principals/users'); + + $this->disableListing = !$config->getSystemValue('debug', false); } /** |