mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
Force Calendar Obejct Chnage Path to support public write
Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
parent
586cc9bcbc
commit
da22791424
2 changed files with 15 additions and 0 deletions
|
|
@ -154,6 +154,11 @@ class CalendarImpl implements ICreateFromString {
|
|||
[, $user] = uriSplit($this->calendar->getPrincipalURI());
|
||||
$fullCalendarFilename = sprintf('calendars/%s/%s/%s', $user, $this->calendarInfo['uri'], $name);
|
||||
|
||||
// Force calendar change URI
|
||||
/** @var Schedule\Plugin $schedulingPlugin */
|
||||
$schedulingPlugin = $server->server->getPlugin('caldav-schedule');
|
||||
$schedulingPlugin->setPathOfCalendarObjectChange($fullCalendarFilename);
|
||||
|
||||
$stream = fopen('php://memory', 'rb+');
|
||||
fwrite($stream, $calendarData);
|
||||
rewind($stream);
|
||||
|
|
|
|||
|
|
@ -88,6 +88,16 @@ class Plugin extends \Sabre\CalDAV\Schedule\Plugin {
|
|||
$server->on('afterCreateFile', [$this, 'dispatchSchedulingResponses']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allow manual setting of the object change URL
|
||||
* to support public write
|
||||
*
|
||||
* @param string $path
|
||||
*/
|
||||
public function setPathOfCalendarObjectChange(string $path): void {
|
||||
$this->pathOfCalendarObjectChange = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method handler is invoked during fetching of properties.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue