1
0

Capabilities.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Christopher Schäpers <kondou@ts.unde.re>
  6. * @author Joas Schilling <coding@schilljs.com>
  7. * @author Roeland Jago Douma <roeland@famdouma.nl>
  8. * @author Tom Needham <tom@owncloud.com>
  9. *
  10. * @license AGPL-3.0
  11. *
  12. * This code is free software: you can redistribute it and/or modify
  13. * it under the terms of the GNU Affero General Public License, version 3,
  14. * as published by the Free Software Foundation.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU Affero General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Affero General Public License, version 3,
  22. * along with this program. If not, see <http://www.gnu.org/licenses/>
  23. *
  24. */
  25. namespace OCA\Files;
  26. use OCP\Capabilities\ICapability;
  27. use OCP\IConfig;
  28. /**
  29. * Class Capabilities
  30. *
  31. * @package OCA\Files
  32. */
  33. class Capabilities implements ICapability {
  34. /** @var IConfig */
  35. protected $config;
  36. /**
  37. * Capabilities constructor.
  38. *
  39. * @param IConfig $config
  40. */
  41. public function __construct(IConfig $config) {
  42. $this->config = $config;
  43. }
  44. /**
  45. * Return this classes capabilities
  46. *
  47. * @return array
  48. */
  49. public function getCapabilities() {
  50. return [
  51. 'files' => [
  52. 'bigfilechunking' => true,
  53. 'blacklisted_files' => $this->config->getSystemValue('blacklisted_files', ['.htaccess']),
  54. ],
  55. ];
  56. }
  57. }