do not advertise ?add_member on a principal

We wouldn't know what to do with that anyway...

Fixes the CalDAV/add-member.xml test.
This commit is contained in:
Florian Schlichting 2017-04-29 00:31:09 +02:00
parent 5f3aecfda4
commit 63c4de9f34
2 changed files with 4 additions and 5 deletions

View File

@ -1656,6 +1656,7 @@ EOQRY;
case 'DAV::add-member':
if ( ! $this->_is_collection ) return false;
if ( $this->_is_principal ) return false;
if ( isset($c->post_add_member) && $c->post_add_member === false ) return false;
$reply->DAVElement( $prop, 'add-member', $reply->href(ConstructURL(DeconstructURL($this->url())).'?add_member') );
break;

View File

@ -4,8 +4,8 @@ HTTP/1.1 207 Multi-Status
Date: Dow, 01 Jan 2000 00:00:00 GMT
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
DAV: extended-mkcol, bind, addressbook, calendar-auto-schedule, calendar-proxy
ETag: "803271349e94513fdc607adc2fc2df6f"
Content-Length: 27776
ETag: "d148cedddc356b211c308738c99d6888"
Content-Length: 27711
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -14,9 +14,6 @@ Content-Type: text/xml; charset="utf-8"
<href>/caldav.php/user1/</href>
<propstat>
<prop>
<add-member>
<href>/caldav.php/user1/?add_member</href>
</add-member>
<current-user-privilege-set>
<privilege>
<all/>
@ -94,6 +91,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
<propstat>
<prop>
<add-member/>
<C:allowed-sharing-modes/>
<M:bulk-requests/>
<A:calendar-color/>