1
0

CustomPrincipalPlugin.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * CalDAV App
  5. *
  6. * @copyright 2021 Anna Larch <anna.larch@gmx.net>
  7. *
  8. * @author Anna Larch <anna.larch@gmx.net>
  9. *
  10. * This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  12. * License as published by the Free Software Foundation; either
  13. * version 3 of the License, or any later version.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public
  21. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCA\DAV\CalDAV\Auth;
  25. use Sabre\DAV\Auth\Plugin;
  26. /**
  27. * Set a custom principal uri to allow public requests to its calendar
  28. */
  29. class CustomPrincipalPlugin extends Plugin {
  30. public function setCurrentPrincipal(?string $currentPrincipal): void {
  31. $this->currentPrincipal = $currentPrincipal;
  32. }
  33. }