mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-07-29 13:19:26 +00:00
New tests, especially focused on expansion and privacy checks.
This commit is contained in:
parent
a47f636392
commit
1fd83c54ca
@ -0,0 +1,151 @@
|
||||
HTTP/1.1 100 Continue
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
|
||||
DAV: extended-mkcol, calendar-proxy, bind, addressbook
|
||||
Content-Length: 0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
|
||||
|
||||
A1 CalDAV DATA: >BEGIN:VCALENDAR
|
||||
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
BEGIN:VEVENT
|
||||
LAST-MODIFIED:20100812T161339Z
|
||||
SEQUENCE:5
|
||||
UID:naltpirh2vfjfmplmsivuo30t8@google.com
|
||||
SUMMARY:Tango Night
|
||||
DESCRIPTION:Never will you see a space glow like a night of Tango at Tea
|
||||
se.\nAll dancers welcome!\n$5 suggested donation
|
||||
DTSTART;TZID=America/Los_Angeles:20100815T200000
|
||||
CREATED:20091221T033228Z
|
||||
DTSTAMP:20100812T161339Z
|
||||
DURATION:PT3H
|
||||
LOCATION:
|
||||
X-VENUE:Tease Restaurant & Bar, corner of 2nd & Main
|
||||
X-EMAIL-RSVP-UPDATES:true
|
||||
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=3SU
|
||||
END:VEVENT
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:America/Los_Angeles
|
||||
X-LIC-LOCATION:America/Los_Angeles
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:-0800
|
||||
TZOFFSETTO:-0700
|
||||
TZNAME:PDT
|
||||
DTSTART:19700308T020000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:-0700
|
||||
TZOFFSETTO:-0800
|
||||
TZNAME:PST
|
||||
DTSTART:19701101T020000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
END:VCALENDAR
|
||||
<
|
||||
caldav_type: >VEVENT<
|
||||
class: >PUBLIC<
|
||||
description: >Never will you see a space glow like a night of Tango at Tease.
|
||||
All dancers welcome!
|
||||
$5 suggested donation<
|
||||
dtend: >2010-08-15 23:00:00<
|
||||
dtstamp: >2010-08-12 16:13:39<
|
||||
dtstart: >2010-08-15 20:00:00<
|
||||
due: >NULL<
|
||||
location: ><
|
||||
logged_user: >14<
|
||||
percent_complete: >NULL<
|
||||
priority: >NULL<
|
||||
rrule: >FREQ=MONTHLY;WKST=MO;BYDAY=3SU<
|
||||
status: >NULL<
|
||||
summary: >Tango Night<
|
||||
transp: >NULL<
|
||||
tz_id: >America/Los_Angeles<
|
||||
uid: >naltpirh2vfjfmplmsivuo30t8@google.com<
|
||||
url: >NULL<
|
||||
user_no: >14<
|
||||
|
||||
A1 CalDAV DATA: >BEGIN:VCALENDAR
|
||||
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
BEGIN:VEVENT
|
||||
SEQUENCE:4
|
||||
DTSTART;TZID=America/Los_Angeles:20090707T170000
|
||||
STATUS:CONFIRMED
|
||||
DTSTAMP:20090828T083735Z
|
||||
SUMMARY:Sketch Salone
|
||||
DTEND;TZID=America/Los_Angeles:20090707T200000
|
||||
LOCATION:Tease Restaurant & Bar\, corner of 2nd & Main
|
||||
RRULE:FREQ=WEEKLY;WKST=SU;INTERVAL=2;UNTIL=20090921T065959Z;BYDAY=MO
|
||||
DESCRIPTION:Sketch Salone\, where the artist in you can come to the surf
|
||||
ace. Live model Hosted by Kevin Christman\n per bench seat by RSVP or w
|
||||
elcome to use a table
|
||||
UID:v3f2otajsto18em4rom3jd4238@google.com
|
||||
TRANSP:TRANSPARENT
|
||||
CREATED:20091221T033228Z
|
||||
END:VEVENT
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:America/Los_Angeles
|
||||
X-LIC-LOCATION:America/Los_Angeles
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:-0800
|
||||
TZOFFSETTO:-0700
|
||||
TZNAME:PDT
|
||||
DTSTART:19700308T020000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:-0700
|
||||
TZOFFSETTO:-0800
|
||||
TZNAME:PST
|
||||
DTSTART:19701101T020000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
SEQUENCE:4
|
||||
DTSTART;TZID=America/Los_Angeles:20090907T170000
|
||||
STATUS:CONFIRMED
|
||||
DTSTAMP:20090828T083735Z
|
||||
SUMMARY:Sketch Salone
|
||||
DTEND;TZID=America/Los_Angeles:20090907T200000
|
||||
LOCATION:Tease Restaurant & Bar\, corner of 2nd & Main
|
||||
DESCRIPTION:Sketch Salone\, where the artist in you can come to the surf
|
||||
ace. Live model Hosted by Kevin Christman\n per bench seat by RSVP or w
|
||||
elcome to use a table
|
||||
UID:v3f2otajsto18em4rom3jd4238@google.com
|
||||
TRANSP:TRANSPARENT
|
||||
CREATED:20091221T033228Z
|
||||
RECURRENCE-ID;TZID=America/Los_Angeles:20090914T170000
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
<
|
||||
caldav_type: >VEVENT<
|
||||
class: >PUBLIC<
|
||||
description: >Sketch Salone, where the artist in you can come to the surface. Live model Hosted by Kevin Christman
|
||||
per bench seat by RSVP or welcome to use a table<
|
||||
dtend: >2009-07-07 20:00:00<
|
||||
dtstamp: >2009-08-28 08:37:35<
|
||||
dtstart: >2009-07-07 17:00:00<
|
||||
due: >NULL<
|
||||
location: >Tease Restaurant & Bar, corner of 2nd & Main<
|
||||
logged_user: >14<
|
||||
percent_complete: >NULL<
|
||||
priority: >NULL<
|
||||
rrule: >FREQ=WEEKLY;WKST=SU;INTERVAL=2;UNTIL=20090921T065959Z;BYDAY=MO<
|
||||
status: >CONFIRMED<
|
||||
summary: >Sketch Salone<
|
||||
transp: >TRANSPARENT<
|
||||
tz_id: >America/Los_Angeles<
|
||||
uid: >v3f2otajsto18em4rom3jd4238@google.com<
|
||||
url: >NULL<
|
||||
user_no: >14<
|
||||
|
||||
count: >2<
|
||||
|
||||
@ -0,0 +1,104 @@
|
||||
#
|
||||
# PUT a calendar collection to user5 so we have some starting events
|
||||
#
|
||||
# There is no CalDAV defined behaviour for this.
|
||||
#
|
||||
TYPE=PUT
|
||||
URL=http://mycaldav/caldav.php/user5/home/
|
||||
HEADER=User-Agent: RSCDS Testing/0.9.x
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
AUTH=user5:user5
|
||||
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
PRODID:-//neutralspace inc.//dotcal.com//EN
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:America/Los_Angeles
|
||||
X-LIC-LOCATION:America/Los_Angeles
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:-0800
|
||||
TZOFFSETTO:-0700
|
||||
TZNAME:PDT
|
||||
DTSTART:19700308T020000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:-0700
|
||||
TZOFFSETTO:-0800
|
||||
TZNAME:PST
|
||||
DTSTART:19701101T020000
|
||||
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VEVENT
|
||||
LAST-MODIFIED:20100812T161339Z
|
||||
SEQUENCE:5
|
||||
UID:naltpirh2vfjfmplmsivuo30t8@google.com
|
||||
SUMMARY:Tango Night
|
||||
DESCRIPTION:Never will you see a space glow like a night of Tango at Tease.
|
||||
\nAll dancers welcome!\n$5 suggested donation
|
||||
DTSTART;TZID=America/Los_Angeles:20100815T200000
|
||||
CREATED:20091221T033228Z
|
||||
DTSTAMP:20100812T161339Z
|
||||
DURATION:PT3H
|
||||
LOCATION:
|
||||
X-VENUE:Tease Restaurant & Bar, corner of 2nd & Main
|
||||
X-EMAIL-RSVP-UPDATES:true
|
||||
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=3SU
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SEQUENCE:4
|
||||
DTSTART;TZID=America/Los_Angeles:20090707T170000
|
||||
STATUS:CONFIRMED
|
||||
DTSTAMP:20090828T083735Z
|
||||
SUMMARY:Sketch Salone
|
||||
DTEND;TZID=America/Los_Angeles:20090707T200000
|
||||
LOCATION:Tease Restaurant & Bar\, corner of 2nd & Main
|
||||
RRULE:FREQ=WEEKLY;WKST=SU;INTERVAL=2;UNTIL=20090921T065959Z;BYDAY=MO
|
||||
DESCRIPTION:Sketch Salone\, where the artist in you can come to the
|
||||
surface. Live model Hosted by Kevin Christman\n per bench seat by
|
||||
RSVP or welcome to use a table
|
||||
UID:v3f2otajsto18em4rom3jd4238@google.com
|
||||
TRANSP:TRANSPARENT
|
||||
CREATED:20091221T033228Z
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
SEQUENCE:4
|
||||
DTSTART;TZID=America/Los_Angeles:20090907T170000
|
||||
STATUS:CONFIRMED
|
||||
DTSTAMP:20090828T083735Z
|
||||
SUMMARY:Sketch Salone
|
||||
DTEND;TZID=America/Los_Angeles:20090907T200000
|
||||
LOCATION:Tease Restaurant & Bar\, corner of 2nd & Main
|
||||
DESCRIPTION:Sketch Salone\, where the artist in you can come to the
|
||||
surface. Live model Hosted by Kevin Christman\n per bench seat by
|
||||
RSVP or welcome to use a table
|
||||
UID:v3f2otajsto18em4rom3jd4238@google.com
|
||||
TRANSP:TRANSPARENT
|
||||
CREATED:20091221T033228Z
|
||||
RECURRENCE-ID;TZID=America/Los_Angeles:20090914T170000
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
|
||||
QUERY
|
||||
SELECT caldav_data.user_no, caldav_type, logged_user,
|
||||
uid, dtstamp, dtstart at time zone tz_locn as dtstart, dtend at time zone tz_locn as dtend, due, summary, location,
|
||||
description, priority, class, transp, rrule, url,
|
||||
percent_complete, tz_id, status,
|
||||
caldav_data AS "A1 CalDAV DATA"
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name) JOIN time_zone USING (tz_id)
|
||||
WHERE caldav_data.dav_name ~ '^/user5/home/'
|
||||
ENDQUERY
|
||||
|
||||
QUERY
|
||||
SELECT count(*)
|
||||
FROM caldav_data JOIN calendar_item USING(dav_name)
|
||||
WHERE caldav_data.dav_name ~ '^/user5/home/'
|
||||
ENDQUERY
|
||||
|
||||
104
testing/tests/regression-suite/0962-REPORT-expanded.result
Normal file
104
testing/tests/regression-suite/0962-REPORT-expanded.result
Normal file
@ -0,0 +1,104 @@
|
||||
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, calendar-proxy, bind, addressbook
|
||||
ETag: "b462ad2abe6f194b2f2e4d241b9b002e"
|
||||
Content-Length: 2487
|
||||
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/user5/home/naltpirh2vfjfmplmsivuo30t8%40google.com.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<C:calendar-data>BEGIN:VCALENDAR
|
||||
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
BEGIN:VEVENT
|
||||
LAST-MODIFIED:20100812T161339Z
|
||||
SEQUENCE:5
|
||||
UID:naltpirh2vfjfmplmsivuo30t8@google.com
|
||||
SUMMARY:Tango Night
|
||||
DESCRIPTION:Never will you see a space glow like a night of Tango at Tea
|
||||
se.\nAll dancers welcome!\n$5 suggested donation
|
||||
CREATED:20091221T033228Z
|
||||
DTSTAMP:20100812T161339Z
|
||||
DURATION:PT3H
|
||||
LOCATION:
|
||||
X-VENUE:Tease Restaurant & Bar, corner of 2nd & Main
|
||||
X-EMAIL-RSVP-UPDATES:true
|
||||
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=3SU
|
||||
DTSTART:20100920T030000Z
|
||||
DURATION:PT3H
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
LAST-MODIFIED:20100812T161339Z
|
||||
SEQUENCE:5
|
||||
UID:naltpirh2vfjfmplmsivuo30t8@google.com
|
||||
SUMMARY:Tango Night
|
||||
DESCRIPTION:Never will you see a space glow like a night of Tango at Tea
|
||||
se.\nAll dancers welcome!\n$5 suggested donation
|
||||
CREATED:20091221T033228Z
|
||||
DTSTAMP:20100812T161339Z
|
||||
DURATION:PT3H
|
||||
LOCATION:
|
||||
X-VENUE:Tease Restaurant & Bar, corner of 2nd & Main
|
||||
X-EMAIL-RSVP-UPDATES:true
|
||||
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=3SU
|
||||
DTSTART:20101018T030000Z
|
||||
DURATION:PT3H
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
LAST-MODIFIED:20100812T161339Z
|
||||
SEQUENCE:5
|
||||
UID:naltpirh2vfjfmplmsivuo30t8@google.com
|
||||
SUMMARY:Tango Night
|
||||
DESCRIPTION:Never will you see a space glow like a night of Tango at Tea
|
||||
se.\nAll dancers welcome!\n$5 suggested donation
|
||||
CREATED:20091221T033228Z
|
||||
DTSTAMP:20100812T161339Z
|
||||
DURATION:PT3H
|
||||
LOCATION:
|
||||
X-VENUE:Tease Restaurant & Bar, corner of 2nd & Main
|
||||
X-EMAIL-RSVP-UPDATES:true
|
||||
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=3SU
|
||||
DTSTART:20101122T040000Z
|
||||
DURATION:PT3H
|
||||
END:VEVENT
|
||||
BEGIN:VEVENT
|
||||
LAST-MODIFIED:20100812T161339Z
|
||||
SEQUENCE:5
|
||||
UID:naltpirh2vfjfmplmsivuo30t8@google.com
|
||||
SUMMARY:Tango Night
|
||||
DESCRIPTION:Never will you see a space glow like a night of Tango at Tea
|
||||
se.\nAll dancers welcome!\n$5 suggested donation
|
||||
CREATED:20091221T033228Z
|
||||
DTSTAMP:20100812T161339Z
|
||||
DURATION:PT3H
|
||||
LOCATION:
|
||||
X-VENUE:Tease Restaurant & Bar, corner of 2nd & Main
|
||||
X-EMAIL-RSVP-UPDATES:true
|
||||
RRULE:FREQ=MONTHLY;WKST=MO;BYDAY=3SU
|
||||
DTSTART:20101220T040000Z
|
||||
DURATION:PT3H
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
</C:calendar-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
dav_name: >/user5/home/naltpirh2vfjfmplmsivuo30t8@google.com.ics<
|
||||
dtstart: >2010-08-16 15:00:00+12<
|
||||
dtstart_utc: >2010-08-16 03:00:00<
|
||||
rrule: >FREQ=MONTHLY;WKST=MO;BYDAY=3SU<
|
||||
|
||||
dav_name: >/user5/home/v3f2otajsto18em4rom3jd4238@google.com.ics<
|
||||
dtstart: >2009-07-08 12:00:00+12<
|
||||
dtstart_utc: >2009-07-08 00:00:00<
|
||||
rrule: >FREQ=WEEKLY;WKST=SU;INTERVAL=2;UNTIL=20090921T065959Z;BYDAY=MO<
|
||||
|
||||
42
testing/tests/regression-suite/0962-REPORT-expanded.test
Normal file
42
testing/tests/regression-suite/0962-REPORT-expanded.test
Normal file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# Test REPORT access to a non-public calendar using a ticket.
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://regression.host/caldav.php/user5/home/
|
||||
AUTH=user5:user5
|
||||
|
||||
|
||||
HEADER=User-Agent: DAViCalTester/public
|
||||
HEADER=Content-Type: text/xml; charset="UTF-8"
|
||||
HEAD
|
||||
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<calendar-query xmlns:D="DAV:" xmlns="urn:ietf:params:xml:ns:caldav">
|
||||
<D:prop>
|
||||
<calendar-data>
|
||||
<expand start="20100901T000000Z" end="20101231T000000Z"/>
|
||||
</calendar-data>
|
||||
</D:prop>
|
||||
<filter>
|
||||
<comp-filter name="VCALENDAR">
|
||||
<comp-filter name="VEVENT">
|
||||
<time-range start="20100901T000000Z" end="20101231T000000Z"/>
|
||||
</comp-filter>
|
||||
</comp-filter>
|
||||
</filter>
|
||||
</calendar-query>
|
||||
ENDDATA
|
||||
|
||||
|
||||
QUERY
|
||||
SELECT dav_name,
|
||||
dtstart, dtstart AT TIME ZONE 'UTC' AS dtstart_utc,
|
||||
rrule
|
||||
FROM calendar_item
|
||||
WHERE dav_name ~ '^/user5/home/'
|
||||
AND rrule IS NOT NULL
|
||||
AND dtstart < '20101201T000000Z'
|
||||
ENDQUERY
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<C:schedule-response xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<C:response>
|
||||
<C:recipient>
|
||||
<href>mailto:user1@example.net</href>
|
||||
</C:recipient>
|
||||
<C:request-status>2.0;Success</C:request-status>
|
||||
<C:calendar-data>BEGIN:VCALENDAR
|
||||
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:REPLY
|
||||
BEGIN:VFREEBUSY
|
||||
DTSTAMP:yyyymmddThhmmssZ
|
||||
DTSTART:20080730T110000Z
|
||||
DTEND:20080803T110000Z
|
||||
FREEBUSY:20080730T190000Z/20080731T050000Z
|
||||
FREEBUSY:20080730T194500Z/20080730T203000Z
|
||||
FREEBUSY:20080730T210000Z/20080730T220000Z
|
||||
FREEBUSY:20080731T190000Z/20080801T050000Z
|
||||
FREEBUSY:20080731T210000Z/20080731T220000Z
|
||||
FREEBUSY:20080801T210000Z/20080801T220000Z
|
||||
FREEBUSY:20080802T210000Z/20080802T220000Z
|
||||
FREEBUSY:20080803T073000Z/20080803T093000Z
|
||||
UID:c5bd82ea-cd89-4f58-8d31-336f47e44f97
|
||||
ORGANIZER:mailto:user4@example.net
|
||||
ATTENDEE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL:
|
||||
mailto:user1@example.net
|
||||
END:VFREEBUSY
|
||||
END:VCALENDAR
|
||||
</C:calendar-data>
|
||||
</C:response>
|
||||
</C:schedule-response>
|
||||
|
||||
class: >PUBLIC<
|
||||
dav_name: >/user1/home/e70576e9-c1e0-431e-a507-0386fd82f223.ics<
|
||||
finish: >20071210T193000Z<
|
||||
rrule: >FREQ=WEEKLY;INTERVAL=1;BYDAY=TU,TH<
|
||||
start: >20071210T184500Z<
|
||||
|
||||
class: >PUBLIC<
|
||||
dav_name: >/user1/home/da81c0ee-7871-11db-c6d6-f6927c144649.ics<
|
||||
finish: >20061102T203000Z<
|
||||
rrule: >FREQ=MONTHLY<
|
||||
start: >20061102T183000Z<
|
||||
|
||||
class: >PUBLIC<
|
||||
dav_name: >/user1/6E20BB7C-EFD9-4F0F-9BDC-5335E04D47E0/6C8A0D88-E1F9-4FC1-9EDD-DA258ABF2CFA.ics<
|
||||
finish: >20071126T040000Z<
|
||||
rrule: >FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;WKST=SU<
|
||||
start: >20071125T180000Z<
|
||||
|
||||
class: >PUBLIC<
|
||||
dav_name: >/user1/collection/Daily_NY_5pm.ics<
|
||||
finish: >20060101T230000Z<
|
||||
rrule: >FREQ=DAILY;INTERVAL=1;COUNT=1000<
|
||||
start: >20060101T220000Z<
|
||||
|
||||
class: >PRIVATE<
|
||||
dav_name: >/user1/anotherone/20060803T084628Z-6040-1000-1-6@lamb.ics<
|
||||
finish: >20060802T093456Z<
|
||||
rrule: >FREQ=YEARLY;INTERVAL=1<
|
||||
start: >20060801T093456Z<
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
#
|
||||
# POST to scheduling outbox for freebusy query of user4 for user1
|
||||
#
|
||||
TYPE=POST
|
||||
URL=http://mycaldav/caldav.php/user4/.out/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18pre) Gecko/20100917 Sunbird/0.9
|
||||
HEADER=Accept: text/xml
|
||||
HEADER=Accept-Language: en-us,en;q=0.5
|
||||
HEADER=Accept-Charset: utf-8,*;q=0.1
|
||||
HEADER=Content-Type: text/calendar; charset=utf-8
|
||||
HEADER=Originator: mailto:user4@example.net
|
||||
HEADER=Recipient: mailto:user1@example.net
|
||||
|
||||
# HEAD
|
||||
|
||||
REPLACE=/^DTSTAMP:\d{4}[01]\d[0123]\dT[012]\d[0-5]\d[0-6]\dZ\r?$/DTSTAMP:yyyymmddThhmmssZ/
|
||||
# REPLACE=/^ETag: "[[:hexdigit:]]+"\s$/ETag: "a fine looking etag"/
|
||||
|
||||
BEGINDATA
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
|
||||
VERSION:2.0
|
||||
METHOD:REQUEST
|
||||
BEGIN:VFREEBUSY
|
||||
DTSTAMP:20081022T062945Z
|
||||
ORGANIZER:mailto:user4@example.net
|
||||
DTSTART:20080730T110000Z
|
||||
DTEND:20080803T110000Z
|
||||
UID:c5bd82ea-cd89-4f58-8d31-336f47e44f97
|
||||
ATTENDEE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL:
|
||||
mailto:user1@example.net
|
||||
END:VFREEBUSY
|
||||
END:VCALENDAR
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT calendar_item.rrule,
|
||||
to_char(calendar_item.dtstart at time zone 'GMT','YYYYMMDD"T"HH24MISS"Z"') AS start,
|
||||
to_char(calendar_item.dtend at time zone 'GMT','YYYYMMDD"T"HH24MISS"Z"') AS finish,
|
||||
class,
|
||||
calendar_item.dav_name
|
||||
FROM usr INNER JOIN collection USING (user_no)
|
||||
INNER JOIN caldav_data USING (collection_id)
|
||||
INNER JOIN calendar_item USING(dav_id)
|
||||
WHERE lower(usr.email) = 'user1@example.net'
|
||||
AND collection.is_calendar
|
||||
AND rrule_event_overlaps( dtstart, dtend, rrule, '20080730T110000Z', '20080803T110000Z' )
|
||||
AND caldav_data.caldav_type IN ( 'VEVENT', 'VFREEBUSY' )
|
||||
AND (calendar_item.transp != 'TRANSPARENT' OR calendar_item.transp IS NULL)
|
||||
AND (calendar_item.status != 'CANCELLED' OR calendar_item.status IS NULL)
|
||||
ORDER BY dav_id
|
||||
ENDQUERY
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
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, calendar-proxy, bind, addressbook
|
||||
ETag: "38a9a5f68b0d1510588fb3456181b129"
|
||||
Content-Length: 1037
|
||||
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/user1/anotherone/86203AFD481A6C42892013E6E0C4845D039A2543%40AKEXBE02.telecom.tcnz.net.ics</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<getetag>"621885941033781f3462950c9bc2844b"</getetag>
|
||||
<C:calendar-data>BEGIN:VCALENDAR
|
||||
PRODID:-//davical.org//NONSGML AWL Calendar//EN
|
||||
VERSION:2.0
|
||||
CALSCALE:GREGORIAN
|
||||
BEGIN:VEVENT
|
||||
UID:86203AFD481A6C42892013E6E0C4845D039A2543@AKEXBE02.telecom.tcnz.net
|
||||
DTSTAMP:20061005T230724Z
|
||||
DTSTART:20070120T093000
|
||||
SUMMARY:Reminder for Mark for Absolom Livasathan's PGP WF Services cost
|
||||
request
|
||||
DESCRIPTION:From Absolom.Livasathan@example.com Fri Oct 6 12:00:02 2006
|
||||
\n
|
||||
ORGANIZER;CN=Absolom Livasathan:Absolom.Livasathan@example.com
|
||||
ATTENDEE;RSVP=FALSE;CN=:andrew@example.org
|
||||
CREATED:20061005T230724
|
||||
LAST-MODIFIED:20061005T230724
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
||||
</C:calendar-data>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
</response>
|
||||
</multistatus>
|
||||
|
||||
class: >PUBLIC<
|
||||
dav_name: >/user1/anotherone/86203AFD481A6C42892013E6E0C4845D039A2543@AKEXBE02.telecom.tcnz.net.ics<
|
||||
finish: >20070120T053000Z<
|
||||
rrule: >NULL<
|
||||
start: >20070120T053000Z<
|
||||
summary: >Reminder for Mark for Absolom Livasathan's PGP WF Services cost request<
|
||||
|
||||
class: >PRIVATE<
|
||||
dav_name: >/user1/anotherone/20060803T084628Z-6040-1000-1-6@lamb.ics<
|
||||
finish: >20060802T093456Z<
|
||||
rrule: >FREQ=YEARLY;INTERVAL=1<
|
||||
start: >20060801T093456Z<
|
||||
summary: >Steve's Private Birthday<
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
#
|
||||
# REPORT on user1's calendar as a less privileged user
|
||||
#
|
||||
TYPE=REPORT
|
||||
URL=http://mycaldav/caldav.php/user1/anotherone/
|
||||
AUTH=user4:user4
|
||||
|
||||
HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18pre) Gecko/20080917 Sunbird/0.9
|
||||
HEADER=Accept: text/xml
|
||||
HEADER=Accept-Language: en-us,en;q=0.5
|
||||
HEADER=Accept-Charset: utf-8,*;q=0.1
|
||||
HEADER=Content-Type: text/xml; charset=utf-8
|
||||
HEADER=Depth: 1
|
||||
HEAD
|
||||
|
||||
BEGINDATA
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<calendar-query xmlns:D="DAV:" xmlns="urn:ietf:params:xml:ns:caldav">
|
||||
<D:prop>
|
||||
<D:getetag/>
|
||||
<calendar-data/>
|
||||
</D:prop>
|
||||
<filter>
|
||||
<comp-filter name="VCALENDAR">
|
||||
<comp-filter name="VEVENT">
|
||||
<time-range start="20070101T000000Z" end="20080803T110000Z"/>
|
||||
</comp-filter>
|
||||
</comp-filter>
|
||||
</filter>
|
||||
</calendar-query>
|
||||
ENDDATA
|
||||
|
||||
QUERY
|
||||
SELECT calendar_item.rrule,
|
||||
to_char(calendar_item.dtstart at time zone 'GMT','YYYYMMDD"T"HH24MISS"Z"') AS start,
|
||||
to_char(calendar_item.dtend at time zone 'GMT','YYYYMMDD"T"HH24MISS"Z"') AS finish,
|
||||
class,
|
||||
calendar_item.dav_name,
|
||||
calendar_item.summary
|
||||
FROM usr INNER JOIN collection USING (user_no)
|
||||
INNER JOIN caldav_data USING (collection_id)
|
||||
INNER JOIN calendar_item USING(dav_id)
|
||||
WHERE collection.dav_name = '/user1/anotherone/'
|
||||
AND collection.is_calendar
|
||||
AND rrule_event_overlaps( dtstart, dtend, rrule, '20070101T000000Z', '20080803T110000Z' )
|
||||
AND caldav_data.caldav_type IN ( 'VEVENT', 'VFREEBUSY' )
|
||||
AND (calendar_item.transp != 'TRANSPARENT' OR calendar_item.transp IS NULL)
|
||||
AND (calendar_item.status != 'CANCELLED' OR calendar_item.status IS NULL)
|
||||
ORDER BY dav_id
|
||||
ENDQUERY
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user