mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
* CalDAV: privileges in other users calendar where reported wrong, leading clients to believe they have write rights here
This commit is contained in:
parent
8eb10b2409
commit
2aaec111b4
@ -905,6 +905,7 @@ class calendar_groupdav extends groupdav_handler
|
||||
|
||||
$xml = new XMLWriter;
|
||||
$xml->openMemory();
|
||||
$xml->setIndent(true);
|
||||
$xml->startDocument('1.0', 'UTF-8');
|
||||
$xml->startElementNs('C', 'schedule-response', groupdav::CALDAV);
|
||||
|
||||
@ -975,22 +976,24 @@ class calendar_groupdav extends groupdav_handler
|
||||
*/
|
||||
public function current_user_privileges($path, $user=null)
|
||||
{
|
||||
$priviledes = parent::current_user_privileges($user);
|
||||
$privileges = parent::current_user_privileges($path, $user);
|
||||
//error_log(__METHOD__."('$path', $user) parent gave ".array2string($privileges));
|
||||
|
||||
if ($this->bo->check_perms(EGW_ACL_FREEBUSY, 0, $user))
|
||||
{
|
||||
$priviledes['read-free-busy'] = HTTP_WebDAV_Server::mkprop(groupdav::CALDAV, 'read-free-busy', '');
|
||||
$privileges['read-free-busy'] = HTTP_WebDAV_Server::mkprop(groupdav::CALDAV, 'read-free-busy', '');
|
||||
|
||||
if (substr($path, -8) == '/outbox/' && $this->bo->check_acl_invite($user))
|
||||
{
|
||||
$priviledes['schedule-send'] = HTTP_WebDAV_Server::mkprop(groupdav::CALDAV, 'schedule-send', '');
|
||||
$privileges['schedule-send'] = HTTP_WebDAV_Server::mkprop(groupdav::CALDAV, 'schedule-send', '');
|
||||
}
|
||||
}
|
||||
if (substr($path, -7) == '/inbox/' && $this->bo->check_acl_invite($user))
|
||||
{
|
||||
$priviledes['schedule-deliver'] = HTTP_WebDAV_Server::mkprop(groupdav::CALDAV, 'schedule-deliver', '');
|
||||
$privileges['schedule-deliver'] = HTTP_WebDAV_Server::mkprop(groupdav::CALDAV, 'schedule-deliver', '');
|
||||
}
|
||||
return $priviledes;
|
||||
//error_log(__METHOD__."('$path', $user) returning ".array2string($privileges));
|
||||
return $privileges;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user