IACL.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\DAVACL;
  4. use Sabre\DAV;
  5. /**
  6. * ACL-enabled node.
  7. *
  8. * If you want to add WebDAV ACL to a node, you must implement this class
  9. *
  10. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  11. * @author Evert Pot (http://evertpot.com/)
  12. * @license http://sabre.io/license/ Modified BSD License
  13. */
  14. interface IACL extends DAV\INode
  15. {
  16. /**
  17. * Returns the owner principal.
  18. *
  19. * This must be a url to a principal, or null if there's no owner
  20. *
  21. * @return string|null
  22. */
  23. public function getOwner();
  24. /**
  25. * Returns a group principal.
  26. *
  27. * This must be a url to a principal, or null if there's no owner
  28. *
  29. * @return string|null
  30. */
  31. public function getGroup();
  32. /**
  33. * Returns a list of ACE's for this node.
  34. *
  35. * Each ACE has the following properties:
  36. * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
  37. * currently the only supported privileges
  38. * * 'principal', a url to the principal who owns the node
  39. * * 'protected' (optional), indicating that this ACE is not allowed to
  40. * be updated.
  41. *
  42. * @return array
  43. */
  44. public function getACL();
  45. /**
  46. * Updates the ACL.
  47. *
  48. * This method will receive a list of new ACE's as an array argument.
  49. */
  50. public function setACL(array $acl);
  51. /**
  52. * Returns the list of supported privileges for this node.
  53. *
  54. * The returned data structure is a list of nested privileges.
  55. * See Sabre\DAVACL\Plugin::getDefaultSupportedPrivilegeSet for a simple
  56. * standard structure.
  57. *
  58. * If null is returned from this method, the default privilege set is used,
  59. * which is fine for most common usecases.
  60. *
  61. * @return array|null
  62. */
  63. public function getSupportedPrivilegeSet();
  64. }