aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Capabilities.php
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2022-06-03 09:57:19 +0200
committerGitHub <noreply@github.com>2022-06-03 09:57:19 +0200
commit2f5a00f5b3a76256b1ba48d65a9ae836a981e113 (patch)
tree0a346444f5c2d6db9cb3ca692010a617bac7202b /apps/files/lib/Capabilities.php
parenta90b647aff45aba4026a748b52709a2a12872c3f (diff)
parent61056587c91f676b55dfd3a86e9d972455c7d448 (diff)
downloadnextcloud-server-2f5a00f5b3a76256b1ba48d65a9ae836a981e113.tar.gz
nextcloud-server-2f5a00f5b3a76256b1ba48d65a9ae836a981e113.zip
Merge pull request #32715 from nextcloud/enh/direct-editing-capabilities
Only load direct editing capabilities when required
Diffstat (limited to 'apps/files/lib/Capabilities.php')
-rw-r--r--apps/files/lib/Capabilities.php31
1 files changed, 3 insertions, 28 deletions
diff --git a/apps/files/lib/Capabilities.php b/apps/files/lib/Capabilities.php
index 29abfb5b253..3eb43578351 100644
--- a/apps/files/lib/Capabilities.php
+++ b/apps/files/lib/Capabilities.php
@@ -25,36 +25,15 @@
*/
namespace OCA\Files;
-use OCA\Files\Service\DirectEditingService;
use OCP\Capabilities\ICapability;
use OCP\IConfig;
-use OCP\IURLGenerator;
-/**
- * Class Capabilities
- *
- * @package OCA\Files
- */
class Capabilities implements ICapability {
- /** @var IConfig */
- protected $config;
-
- /** @var DirectEditingService */
- protected $directEditingService;
+ protected IConfig $config;
- /** @var IURLGenerator */
- private $urlGenerator;
-
- /**
- * Capabilities constructor.
- *
- * @param IConfig $config
- */
- public function __construct(IConfig $config, DirectEditingService $directEditingService, IURLGenerator $urlGenerator) {
+ public function __construct(IConfig $config) {
$this->config = $config;
- $this->directEditingService = $directEditingService;
- $this->urlGenerator = $urlGenerator;
}
/**
@@ -66,11 +45,7 @@ class Capabilities implements ICapability {
return [
'files' => [
'bigfilechunking' => true,
- 'blacklisted_files' => $this->config->getSystemValue('blacklisted_files', ['.htaccess']),
- 'directEditing' => [
- 'url' => $this->urlGenerator->linkToOCSRouteAbsolute('files.DirectEditing.info'),
- 'etag' => $this->directEditingService->getDirectEditingETag()
- ]
+ 'blacklisted_files' => $this->config->getSystemValue('blacklisted_files', ['.htaccess'])
],
];
}