User.php 877 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCA\DAV\CalDAV\Principal;
  7. /**
  8. * Class User
  9. *
  10. * @package OCA\DAV\CalDAV\Principal
  11. */
  12. class User extends \Sabre\CalDAV\Principal\User {
  13. /**
  14. * Returns a list of ACE's for this node.
  15. *
  16. * Each ACE has the following properties:
  17. * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
  18. * currently the only supported privileges
  19. * * 'principal', a url to the principal who owns the node
  20. * * 'protected' (optional), indicating that this ACE is not allowed to
  21. * be updated.
  22. *
  23. * @return array
  24. */
  25. public function getACL() {
  26. $acl = parent::getACL();
  27. $acl[] = [
  28. 'privilege' => '{DAV:}read',
  29. 'principal' => '{DAV:}authenticated',
  30. 'protected' => true,
  31. ];
  32. return $acl;
  33. }
  34. }