Add a test case for /user/calendar-proxy-read/ with return=minimal

and update 0525-iCal-PROPFIND now that we return a result for proxy
group-member-set
This commit is contained in:
Florian Schlichting 2016-12-29 00:34:04 +01:00
parent c71bf2511e
commit f8ee381840
3 changed files with 78 additions and 3 deletions

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: "d5cc88f137d733e311ab4e4f73e88ed8"
Content-Length: 1357
ETag: "87bca499488e3f4a217d3c2585b17ad5"
Content-Length: 1459
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
@ -18,6 +18,10 @@ Content-Type: text/xml; charset="utf-8"
<collection/>
<C:calendar-proxy-read/>
</resourcetype>
<group-member-set>
<href>/caldav.php/user1/</href>
<href>/caldav.php/assistant1/</href>
</group-member-set>
<group-membership>
<href>/caldav.php/assistant1/</href>
<href>/caldav.php/teamclient1/</href>
@ -40,7 +44,6 @@ Content-Type: text/xml; charset="utf-8"
<propstat>
<prop>
<C1:calendar-description/>
<group-member-set/>
</prop>
<status>HTTP/1.1 404 Not Found</status>
</propstat>

View File

@ -0,0 +1,47 @@
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: "ef355f1b27cdb05f1465aeb58f9d1baa"
Content-Length: 1120
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
<response>
<href>/caldav.php/resource1/calendar-proxy-read/</href>
<propstat>
<prop>
<group-member-set>
<response>
<href>/caldav.php/user1/</href>
<propstat>
<prop>
<displayname>User 1</displayname>
<C:calendar-user-address-set>
<href>mailto:user1@example.net</href>
<href>/caldav.php/user1/</href>
</C:calendar-user-address-set>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
<response>
<href>/caldav.php/assistant1/</href>
<propstat>
<prop>
<displayname>Assistant 1</displayname>
<C:calendar-user-address-set>
<href>mailto:assistant1@example.net</href>
<href>/caldav.php/assistant1/</href>
</C:calendar-user-address-set>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</group-member-set>
</prop>
<status>HTTP/1.1 200 OK</status>
</propstat>
</response>
</multistatus>

View File

@ -0,0 +1,25 @@
#
# check group-member-set on /user/calendar-proxy-read/
# (look up the principals that have been delegated read access to this user)
# and return a minimal result (excluding the 404s on unsupported email-address-set)
#
TYPE=REPORT
URL=http://mycaldav/caldav.php/resource1/calendar-proxy-read/
HEAD
AUTH=manager1:manager1
HEADER=Content-Type: text/xml
HEADER=Prefer: return=minimal
HEADER=User-Agent: Mac+OS+X/10.11.4 (15E65) CalendarAgent/361.2
BEGINDATA
<?xml version="1.0" encoding="UTF-8"?>
<A:expand-property xmlns:A="DAV:">
<A:property name="group-member-set" namespace="DAV:">
<A:property name="displayname" namespace="DAV:"/>
<A:property name="calendar-user-address-set" namespace="urn:ietf:params:xml:ns:caldav"/>
<A:property name="email-address-set" namespace="http://calendarserver.org/ns/"/>
</A:property>
</A:expand-property>
ENDDATA