caldav-proxy 5.2: calendar-proxy-read/write are themselves principal resources

Fixes the CalDAV/calendaruserproxy.xml test.
This commit is contained in:
Florian Schlichting 2017-04-29 01:04:50 +02:00
parent 63c4de9f34
commit a6b286ab98
15 changed files with 56 additions and 29 deletions

View File

@ -84,7 +84,7 @@ function add_proxy_response( $which, $parent_path ) {
$collection->created = date('Ymd\THis');
$collection->dav_etag = md5($c->system_name . $collection->dav_name . implode($proxy_group) );
$collection->proxy_for = $proxy_group;
$collection->resourcetypes = sprintf('<DAV::collection/><http://calendarserver.org/ns/:calendar-proxy-%s/>', $which);
$collection->resourcetypes = sprintf('<DAV::principal/><DAV::collection/><http://calendarserver.org/ns/:calendar-proxy-%s/>', $which);
$collection->in_freebusy_set = 'f';
$collection->schedule_transp = 'transp';
$collection->timezone = null;

View File

@ -2,8 +2,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: "6224e345c323da0dfc00689c21171119"
Content-Length: 2254
ETag: "e6d93b26332f9761d7f7c0b312b67203"
Content-Length: 2290
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -71,6 +71,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-read/>
</resourcetype>
@ -90,6 +91,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "966d4f7d769690fca393be5ba814e8a2"
Content-Length: 2655
ETag: "2ebe7538bcf8ebd276b16f11e23fe089"
Content-Length: 2691
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -90,6 +90,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-read/>
</resourcetype>
@ -109,6 +110,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "fd17acf5fe9ad6e6612323ef680b3d10"
Content-Length: 2601
ETag: "e47dc7e426b489d5b895ae49c27f9d18"
Content-Length: 2637
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -90,6 +90,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-read/>
</resourcetype>
@ -109,6 +110,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<getcontenttype>httpd/unix-directory</getcontenttype>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "e3f59c55883b61b4390fd7ffbe74644b"
Content-Length: 3649
ETag: "a6b5a79175d3f6a77c40f55e50783e55"
Content-Length: 3685
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -134,6 +134,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<displayname>/user1/calendar-proxy-read/</displayname>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-read/>
</resourcetype>
@ -154,6 +155,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<displayname>/user1/calendar-proxy-write/</displayname>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "fb3fbd1d4d0cc1e1926d0291a2be17a8"
Content-Length: 4076
ETag: "f2de15142ea3906e3616b81150a746b5"
Content-Length: 4112
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -130,6 +130,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"19a2e9eecca4a20bb93c23c0ab653d77"</C:getctag>
<displayname>/user2/calendar-proxy-read/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
@ -153,6 +154,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"f9ade6a8d81cbc6a7a7b932981955bb4"</C:getctag>
<displayname>/user2/calendar-proxy-write/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "45a0a8b922545d0793e9b0b9d10726fe"
Content-Length: 6054
ETag: "b7d922855233223a02e6ae2b26b1e384"
Content-Length: 6090
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -126,6 +126,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"ccdfbfa2e7ee6c47d3ea8f134d415b89"</C:getctag>
<displayname>/manager1/calendar-proxy-read/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
@ -163,6 +164,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"ff25f14bac404c0aae34b5e75618d479"</C:getctag>
<displayname>/manager1/calendar-proxy-write/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "87bca499488e3f4a217d3c2585b17ad5"
Content-Length: 1459
ETag: "5712eb30f86b6a9755a688c43b4bb763"
Content-Length: 1477
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -15,6 +15,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"ccdfbfa2e7ee6c47d3ea8f134d415b89"</C:getctag>
<displayname>/manager1/calendar-proxy-read/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>

View File

@ -2,8 +2,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: "2f6bc2532047e694057b7ec66bd80b65"
Content-Length: 15568
ETag: "b61898a70b17314ab1368136b7899458"
Content-Length: 15604
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -544,6 +544,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"abad5538c4aa570cc54b6ff0d36a4565"</C:getctag>
<displayname>/user1/calendar-proxy-read/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
@ -615,6 +616,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"04ba2c2164225fb5abce13f2c523b6c7"</C:getctag>
<displayname>/user1/calendar-proxy-write/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "84f6ab86e65ad459a930d65cf80aad20"
Content-Length: 17999
ETag: "d53571128cc728cde4c63151596715bf"
Content-Length: 18035
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -621,6 +621,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"abad5538c4aa570cc54b6ff0d36a4565"</C:getctag>
<displayname>/user1/calendar-proxy-read/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
@ -703,6 +704,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"04ba2c2164225fb5abce13f2c523b6c7"</C:getctag>
<displayname>/user1/calendar-proxy-write/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-write/>
</resourcetype>

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: "d148cedddc356b211c308738c99d6888"
Content-Length: 27711
ETag: "aec265205859386bcdf4b58ce5820905"
Content-Length: 27747
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -958,6 +958,7 @@ Content-Type: text/xml; charset="utf-8"
<href>/caldav.php/user1/</href>
</owner>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
@ -1097,6 +1098,7 @@ Content-Type: text/xml; charset="utf-8"
<href>/caldav.php/user1/</href>
</owner>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "7513417f3b7f77337d0ae47039f47f5a"
Content-Length: 12598
ETag: "ae6b5e0b9194d560b5b73b951f256b6e"
Content-Length: 12634
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -467,6 +467,7 @@ Content-Type: text/xml; charset="utf-8"
<displayname>/user1/calendar-proxy-read/</displayname>
<C:getctag>"abad5538c4aa570cc54b6ff0d36a4565"</C:getctag>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
@ -527,6 +528,7 @@ Content-Type: text/xml; charset="utf-8"
<displayname>/user1/calendar-proxy-write/</displayname>
<C:getctag>"04ba2c2164225fb5abce13f2c523b6c7"</C:getctag>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "7513417f3b7f77337d0ae47039f47f5a"
Content-Length: 12598
ETag: "ae6b5e0b9194d560b5b73b951f256b6e"
Content-Length: 12634
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -467,6 +467,7 @@ Content-Type: text/xml; charset="utf-8"
<displayname>/user1/calendar-proxy-read/</displayname>
<C:getctag>"abad5538c4aa570cc54b6ff0d36a4565"</C:getctag>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
@ -527,6 +528,7 @@ Content-Type: text/xml; charset="utf-8"
<displayname>/user1/calendar-proxy-write/</displayname>
<C:getctag>"04ba2c2164225fb5abce13f2c523b6c7"</C:getctag>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "9057a2847bd4becabc777dab5decf806"
Content-Length: 4549
ETag: "f572268d68b8a8248e5815aed2fb71b8"
Content-Length: 4585
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -158,6 +158,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<displayname>/user1/calendar-proxy-read/</displayname>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-read/>
</resourcetype>
@ -177,6 +178,7 @@ Content-Type: text/xml; charset="utf-8"
<prop>
<displayname>/user1/calendar-proxy-write/</displayname>
<resourcetype>
<principal/>
<collection/>
<C2:calendar-proxy-write/>
</resourcetype>

View File

@ -2,8 +2,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: "4958f56cf9ec116e609399113e3e021e"
Content-Length: 3633
ETag: "658053f61e0687f1f65422d691ef980c"
Content-Length: 3669
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -107,6 +107,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"7032a440adf6aaab2a81cd3bc214d153"</C:getctag>
<displayname>/User Six/calendar-proxy-read/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
@ -130,6 +131,7 @@ Content-Type: text/xml; charset="utf-8"
<C:getctag>"d729246362363c87ec3d13d6eaa99efa"</C:getctag>
<displayname>/User Six/calendar-proxy-write/</displayname>
<resourcetype>
<principal/>
<collection/>
<C:calendar-proxy-write/>
</resourcetype>