User.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017, Christoph Seitz <christoph.seitz@posteo.de>
  4. *
  5. * @author Christoph Seitz <christoph.seitz@posteo.de>
  6. *
  7. * @license GNU AGPL version 3 or any later version
  8. *
  9. * This code is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License, version 3,
  11. * as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public License, version 3,
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>
  20. *
  21. */
  22. namespace OCA\DAV\CalDAV\Principal;
  23. /**
  24. * Class User
  25. *
  26. * @package OCA\DAV\CalDAV\Principal
  27. */
  28. class User extends \Sabre\CalDAV\Principal\User {
  29. /**
  30. * Returns a list of ACE's for this node.
  31. *
  32. * Each ACE has the following properties:
  33. * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are
  34. * currently the only supported privileges
  35. * * 'principal', a url to the principal who owns the node
  36. * * 'protected' (optional), indicating that this ACE is not allowed to
  37. * be updated.
  38. *
  39. * @return array
  40. */
  41. function getACL() {
  42. $acl = parent::getACL();
  43. $acl[] = [
  44. 'privilege' => '{DAV:}read',
  45. 'principal' => '{DAV:}authenticated',
  46. 'protected' => true,
  47. ];
  48. return $acl;
  49. }
  50. }