Capabilities.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud GmbH
  4. *
  5. * @author Thomas Müller <thomas.mueller@tmit.eu>
  6. * @author Louis Chemineau <louis@chmn.me>
  7. * @author Côme Chilliet <come.chilliet@nextcloud.com>
  8. *
  9. * @license AGPL-3.0
  10. *
  11. * This code is free software: you can redistribute it and/or modify
  12. * it under the terms of the GNU Affero General Public License, version 3,
  13. * as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License, version 3,
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>
  22. *
  23. */
  24. namespace OCA\DAV;
  25. use OCP\Capabilities\ICapability;
  26. use OCP\IConfig;
  27. class Capabilities implements ICapability {
  28. private IConfig $config;
  29. public function __construct(IConfig $config) {
  30. $this->config = $config;
  31. }
  32. public function getCapabilities() {
  33. $capabilities = [
  34. 'dav' => [
  35. 'chunking' => '1.0',
  36. ]
  37. ];
  38. if ($this->config->getSystemValueBool('bulkupload.enabled', true)) {
  39. $capabilities['dav']['bulkupload'] = '1.0';
  40. }
  41. return $capabilities;
  42. }
  43. }