constants.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Morris Jobke <hey@morrisjobke.de>
  7. * @author Roeland Jago Douma <roeland@famdouma.nl>
  8. * @author Thomas Tanghus <thomas@tanghus.net>
  9. * @author Vincent Petry <pvince81@owncloud.com>
  10. *
  11. * @license AGPL-3.0
  12. *
  13. * This code is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License, version 3,
  15. * as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License, version 3,
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>
  24. *
  25. */
  26. /**
  27. * This file defines common constants used in ownCloud
  28. */
  29. namespace OCP;
  30. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_CREATE instead */
  31. const PERMISSION_CREATE = 4;
  32. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_READ instead */
  33. const PERMISSION_READ = 1;
  34. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_UPDATE instead */
  35. const PERMISSION_UPDATE = 2;
  36. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_DELETE instead */
  37. const PERMISSION_DELETE = 8;
  38. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_SHARE instead */
  39. const PERMISSION_SHARE = 16;
  40. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_ALL instead */
  41. const PERMISSION_ALL = 31;
  42. /** @deprecated 8.0.0 Use \OCP\Constants::FILENAME_INVALID_CHARS instead */
  43. const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n";
  44. /**
  45. * Class Constants
  46. *
  47. * @package OCP
  48. * @since 8.0.0
  49. */
  50. class Constants {
  51. /**
  52. * CRUDS permissions.
  53. * @since 8.0.0
  54. */
  55. const PERMISSION_CREATE = 4;
  56. const PERMISSION_READ = 1;
  57. const PERMISSION_UPDATE = 2;
  58. const PERMISSION_DELETE = 8;
  59. const PERMISSION_SHARE = 16;
  60. const PERMISSION_ALL = 31;
  61. /**
  62. * @since 8.0.0 - Updated in 9.0.0 to allow all POSIX chars since we no
  63. * longer support windows as server platform.
  64. */
  65. const FILENAME_INVALID_CHARS = "\\/";
  66. }