mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 23:08:53 +01:00
Allow to add events to group calendars via CalDAV
This commit is contained in:
parent
bddb577d95
commit
a85fdb55cd
@ -484,7 +484,7 @@ error_log(__METHOD__."($path,,".array2string($start).") filter=".array2string($f
|
||||
return $oldEvent;
|
||||
}
|
||||
|
||||
if (is_null($oldEvent) && !$this->bo->check_perms(EGW_ACL_ADD, 0, $user))
|
||||
if (is_null($oldEvent) && ($user >= 0) && !$this->bo->check_perms(EGW_ACL_ADD, 0, $user))
|
||||
{
|
||||
// we have no add permission on this user's calendar
|
||||
if ($this->debug) error_log(__METHOD__."(,$user) we have not enough rights on this calendar");
|
||||
|
@ -1343,15 +1343,25 @@ class calendar_ical extends calendar_boupdate
|
||||
|
||||
if (!is_null($user))
|
||||
{
|
||||
if ($this->check_perms(EGW_ACL_ADD, 0, $user))
|
||||
if (($user >= 0 ) && $this->check_perms(EGW_ACL_ADD, 0, $user))
|
||||
{
|
||||
$event['owner'] = $user;
|
||||
}
|
||||
else
|
||||
elseif ($user >= 0)
|
||||
{
|
||||
date_default_timezone_set($GLOBALS['egw_info']['server']['server_timezone']);
|
||||
return 0; // no permission
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add Group a invitation
|
||||
$event['owner'] = $this->user;
|
||||
if (!isset($event['participants'][$this->user]))
|
||||
{
|
||||
$event['participants'][$this->user] = calendar_so::combine_status('A', 1, 'CHAIR');
|
||||
}
|
||||
$event['participants'][$user] = calendar_so::combine_status('U');
|
||||
}
|
||||
}
|
||||
// check if an owner is set and the current user has add rights
|
||||
// for that owners calendar; if not set the current user
|
||||
|
Loading…
Reference in New Issue
Block a user