constants.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * @author Joas Schilling <nickvergessen@owncloud.com>
  4. * @author Morris Jobke <hey@morrisjobke.de>
  5. * @author Roeland Jago Douma <rullzer@owncloud.com>
  6. * @author Thomas Tanghus <thomas@tanghus.net>
  7. * @author Vincent Petry <pvince81@owncloud.com>
  8. *
  9. * @copyright Copyright (c) 2016, ownCloud, Inc.
  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. /**
  26. * This file defines common constants used in ownCloud
  27. */
  28. namespace OCP;
  29. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_CREATE instead */
  30. const PERMISSION_CREATE = 4;
  31. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_READ instead */
  32. const PERMISSION_READ = 1;
  33. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_UPDATE instead */
  34. const PERMISSION_UPDATE = 2;
  35. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_DELETE instead */
  36. const PERMISSION_DELETE = 8;
  37. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_SHARE instead */
  38. const PERMISSION_SHARE = 16;
  39. /** @deprecated 8.0.0 Use \OCP\Constants::PERMISSION_ALL instead */
  40. const PERMISSION_ALL = 31;
  41. /** @deprecated 8.0.0 Use \OCP\Constants::FILENAME_INVALID_CHARS instead */
  42. const FILENAME_INVALID_CHARS = "\\/<>:\"|?*\n";
  43. /**
  44. * Class Constants
  45. *
  46. * @package OCP
  47. * @since 8.0.0
  48. */
  49. class Constants {
  50. /**
  51. * CRUDS permissions.
  52. * @since 8.0.0
  53. */
  54. const PERMISSION_CREATE = 4;
  55. const PERMISSION_READ = 1;
  56. const PERMISSION_UPDATE = 2;
  57. const PERMISSION_DELETE = 8;
  58. const PERMISSION_SHARE = 16;
  59. const PERMISSION_ALL = 31;
  60. /**
  61. * @since 8.0.0 - Updated in 9.0.0 to allow all POSIX chars since we no
  62. * longer support windows as server platform.
  63. */
  64. const FILENAME_INVALID_CHARS = "\\/";
  65. }