mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
* CalDAV: could not set own status for participation in an exception, if not being a participant of master
This commit is contained in:
parent
de4098e550
commit
8643b08e90
@ -2059,7 +2059,6 @@ class calendar_bo
|
|||||||
if (!is_array($entry))
|
if (!is_array($entry))
|
||||||
{
|
{
|
||||||
list($id,$recur_date) = explode(':',$entry);
|
list($id,$recur_date) = explode(':',$entry);
|
||||||
if (!$this->check_perms(EGW_ACL_FREEBUSY, $id, 0, 'server')) return false;
|
|
||||||
$entry = $this->read($id, $recur_date, true, 'server');
|
$entry = $this->read($id, $recur_date, true, 'server');
|
||||||
}
|
}
|
||||||
$etag = $schedule_tag = $entry['id'].':'.$entry['etag'];
|
$etag = $schedule_tag = $entry['id'].':'.$entry['etag'];
|
||||||
|
@ -842,7 +842,9 @@ class calendar_groupdav extends groupdav_handler
|
|||||||
{
|
{
|
||||||
$user_and_memberships = $GLOBALS['egw']->accounts->memberships($user, true);
|
$user_and_memberships = $GLOBALS['egw']->accounts->memberships($user, true);
|
||||||
$user_and_memberships[] = $user;
|
$user_and_memberships[] = $user;
|
||||||
if (!array_intersect(array_keys($oldEvent['participants']), $user_and_memberships))
|
if (!array_intersect(array_keys($oldEvent['participants']), $user_and_memberships) &&
|
||||||
|
// above can be true, if current user is not in master but just a recurrence
|
||||||
|
(!$oldEvent['recur_type'] || !($series = self::get_series($oldEvent['uid'], $this->bo))))
|
||||||
{
|
{
|
||||||
if ($this->debug) error_log(__METHOD__."(,,$user) user $user is NOT an attendee!");
|
if ($this->debug) error_log(__METHOD__."(,,$user) user $user is NOT an attendee!");
|
||||||
return '403 Forbidden';
|
return '403 Forbidden';
|
||||||
@ -851,11 +853,10 @@ class calendar_groupdav extends groupdav_handler
|
|||||||
if (($events = $handler->icaltoegw($vCalendar)))
|
if (($events = $handler->icaltoegw($vCalendar)))
|
||||||
{
|
{
|
||||||
$modified = 0;
|
$modified = 0;
|
||||||
$series = null;
|
|
||||||
foreach($events as $n => $event)
|
foreach($events as $n => $event)
|
||||||
{
|
{
|
||||||
// for recurrances of event series, we need to read correct recurrence (or if series master is no first event)
|
// for recurrances of event series, we need to read correct recurrence (or if series master is no first event)
|
||||||
if ($event['recurrence'] || $n && !$event['recurrence'])
|
if ($event['recurrence'] || $n && !$event['recurrence'] || isset($series))
|
||||||
{
|
{
|
||||||
// first try reading (virtual and real) exceptions
|
// first try reading (virtual and real) exceptions
|
||||||
if (!isset($series))
|
if (!isset($series))
|
||||||
@ -868,7 +869,7 @@ class calendar_groupdav extends groupdav_handler
|
|||||||
if ($oldEvent['recurrence'] == $event['recurrence']) break;
|
if ($oldEvent['recurrence'] == $event['recurrence']) break;
|
||||||
}
|
}
|
||||||
// if no exception found, check if it might be just a recurrence (no exception)
|
// if no exception found, check if it might be just a recurrence (no exception)
|
||||||
if ($oldEvent['recurrence'] != $event['recurrence'])
|
if ($event['recurrence'] && $oldEvent['recurrence'] != $event['recurrence'])
|
||||||
{
|
{
|
||||||
if (!($oldEvent = $this->bo->read($eventId, $event['recurrence'], true)) ||
|
if (!($oldEvent = $this->bo->read($eventId, $event['recurrence'], true)) ||
|
||||||
// virtual exceptions have recurrence=0 and recur_date=recurrence (series master or real exceptions have recurence=0)
|
// virtual exceptions have recurrence=0 and recur_date=recurrence (series master or real exceptions have recurence=0)
|
||||||
|
Loading…
Reference in New Issue
Block a user