diff --git a/dba/sample-data.sql b/dba/sample-data.sql
index 467f08a4..5022d96f 100644
--- a/dba/sample-data.sql
+++ b/dba/sample-data.sql
@@ -23,6 +23,7 @@ INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullna
INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullname, email )
VALUES( 30, TRUE, current_date, current_date, 'assistant1', '**assistant1', 'Assistant 1', 'assistant1@example.net' );
+
INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullname, email )
VALUES( 100, TRUE, current_date, current_date, 'resource1', '*salt*unpossible', 'Resource 1', 'resource1@example.net' );
INSERT INTO usr ( user_no, active, email_ok, updated, username, password, fullname, email )
@@ -53,6 +54,7 @@ INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 30, 200, 1 );
-- Between a PA and their Manager
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 30, 20, 2 );
+INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 30, 10, 2 );
-- Between a team
INSERT INTO relationship ( from_user, to_user, rt_id ) VALUES( 20, 300, 3 );
diff --git a/testing/tests/regression-suite/218-Moz-REPORT.result b/testing/tests/regression-suite/218-Moz-REPORT.result
new file mode 100644
index 00000000..f44392a4
--- /dev/null
+++ b/testing/tests/regression-suite/218-Moz-REPORT.result
@@ -0,0 +1,118 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, access-control, calendar-access
+ETag: "f7c12929e08c550e63f2fb435ed40c85"
+Content-Length: 3002
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//Mozilla Calendar//NONSGML Sunbird//EN
+VERSION:2.0
+BEGIN:VEVENT
+CREATED:20061120T041336Z
+LAST-MODIFIED:20061120T041709Z
+DTSTAMP:20061120T041709Z
+UID:4aaf8f37-f232-4c8e-a72e-e171d4c4fe54
+SUMMARY:Weekly Project Meeting
+PRIORITY:0
+CLASS:PUBLIC
+RRULE:FREQ=WEEKLY;COUNT=26;INTERVAL=1;BYDAY=TH
+DTSTART;TZID=/mozilla.org/20050126_1/Pacific/Auckland:20061102T100000
+DTEND;TZID=/mozilla.org/20050126_1/Pacific/Auckland:20061102T110000
+CATEGORIES:Projects
+X-MOZ-LOCATIONPATH:4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics
+END:VEVENT
+BEGIN:VTIMEZONE
+TZID:/mozilla.org/20050126_1/Pacific/Auckland
+X-LIC-LOCATION:Pacific/Auckland
+BEGIN:STANDARD
+TZOFFSETFROM:+1300
+TZOFFSETTO:+1200
+TZNAME:NZST
+DTSTART:19700315T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+1200
+TZOFFSETTO:+1300
+TZNAME:NZDT
+DTSTART:19701004T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
+END:DAYLIGHT
+END:VTIMEZONE
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
+ /caldav.php/user1/home/9d050be7-8a02-4355-8ed3-02a9fc5f473f.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//Catalyst.Net.NZ//NONSGML AWL Calendar//EN
+VERSION:2.0
+BEGIN:VEVENT
+SUMMARY:Busy
+CLASS:CONFIDENTIAL
+DTSTART:20061223T160000
+DTEND:20061223T180000
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
+ /caldav.php/user1/home/fbd57454-d966-4a14-8341-abe1edb1ae66.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//Mozilla Calendar//NONSGML Sunbird//EN
+VERSION:2.0
+BEGIN:VEVENT
+CREATED:20061223T051646Z
+LAST-MODIFIED:20061223T051713Z
+DTSTAMP:20061223T051713Z
+UID:fbd57454-d966-4a14-8341-abe1edb1ae66
+SUMMARY:Tentative Event
+STATUS:TENTATIVE
+CLASS:PUBLIC
+DTSTART;TZID=/mozilla.org/20050126_1/Antarctica/McMurdo:20061223T190000
+DTEND;TZID=/mozilla.org/20050126_1/Antarctica/McMurdo:20061223T210000
+X-MOZ-LOCATIONPATH:fbd57454-d966-4a14-8341-abe1edb1ae66.ics
+LOCATION:Never never land
+END:VEVENT
+BEGIN:VTIMEZONE
+TZID:/mozilla.org/20050126_1/Antarctica/McMurdo
+X-LIC-LOCATION:Antarctica/McMurdo
+BEGIN:STANDARD
+TZOFFSETFROM:+1300
+TZOFFSETTO:+1200
+TZNAME:NZST
+DTSTART:19700315T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+1200
+TZOFFSETTO:+1300
+TZNAME:NZDT
+DTSTART:19701004T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
+END:DAYLIGHT
+END:VTIMEZONE
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/218-Moz-REPORT.test b/testing/tests/regression-suite/218-Moz-REPORT.test
new file mode 100644
index 00000000..fa7e3f54
--- /dev/null
+++ b/testing/tests/regression-suite/218-Moz-REPORT.test
@@ -0,0 +1,17 @@
+#
+# Request a REPORT as a user with read only access.
+#
+TYPE=REPORT
+AUTH=manager1:manager1
+URL=http://mycaldav/caldav.php/user1/home/
+HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061108 Calendar/0.4a1
+HEADER=Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+HEADER=Accept-Language: en-us,en;q=0.5
+HEADER=Accept-Encoding: gzip,deflate
+HEADER=Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+HEADER=Keep-Alive: 300
+HEADER=Content-Type: text/xml
+HEADER=Depth: 1
+HEAD
+
+DATA=208-Moz-REPORT-5
diff --git a/testing/tests/regression-suite/219-Moz-REPORT.result b/testing/tests/regression-suite/219-Moz-REPORT.result
new file mode 100644
index 00000000..f44392a4
--- /dev/null
+++ b/testing/tests/regression-suite/219-Moz-REPORT.result
@@ -0,0 +1,118 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, access-control, calendar-access
+ETag: "f7c12929e08c550e63f2fb435ed40c85"
+Content-Length: 3002
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//Mozilla Calendar//NONSGML Sunbird//EN
+VERSION:2.0
+BEGIN:VEVENT
+CREATED:20061120T041336Z
+LAST-MODIFIED:20061120T041709Z
+DTSTAMP:20061120T041709Z
+UID:4aaf8f37-f232-4c8e-a72e-e171d4c4fe54
+SUMMARY:Weekly Project Meeting
+PRIORITY:0
+CLASS:PUBLIC
+RRULE:FREQ=WEEKLY;COUNT=26;INTERVAL=1;BYDAY=TH
+DTSTART;TZID=/mozilla.org/20050126_1/Pacific/Auckland:20061102T100000
+DTEND;TZID=/mozilla.org/20050126_1/Pacific/Auckland:20061102T110000
+CATEGORIES:Projects
+X-MOZ-LOCATIONPATH:4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics
+END:VEVENT
+BEGIN:VTIMEZONE
+TZID:/mozilla.org/20050126_1/Pacific/Auckland
+X-LIC-LOCATION:Pacific/Auckland
+BEGIN:STANDARD
+TZOFFSETFROM:+1300
+TZOFFSETTO:+1200
+TZNAME:NZST
+DTSTART:19700315T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+1200
+TZOFFSETTO:+1300
+TZNAME:NZDT
+DTSTART:19701004T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
+END:DAYLIGHT
+END:VTIMEZONE
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
+ /caldav.php/user1/home/9d050be7-8a02-4355-8ed3-02a9fc5f473f.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//Catalyst.Net.NZ//NONSGML AWL Calendar//EN
+VERSION:2.0
+BEGIN:VEVENT
+SUMMARY:Busy
+CLASS:CONFIDENTIAL
+DTSTART:20061223T160000
+DTEND:20061223T180000
+END:VEVENT
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
+ /caldav.php/user1/home/fbd57454-d966-4a14-8341-abe1edb1ae66.ics
+
+
+ BEGIN:VCALENDAR
+PRODID:-//Mozilla Calendar//NONSGML Sunbird//EN
+VERSION:2.0
+BEGIN:VEVENT
+CREATED:20061223T051646Z
+LAST-MODIFIED:20061223T051713Z
+DTSTAMP:20061223T051713Z
+UID:fbd57454-d966-4a14-8341-abe1edb1ae66
+SUMMARY:Tentative Event
+STATUS:TENTATIVE
+CLASS:PUBLIC
+DTSTART;TZID=/mozilla.org/20050126_1/Antarctica/McMurdo:20061223T190000
+DTEND;TZID=/mozilla.org/20050126_1/Antarctica/McMurdo:20061223T210000
+X-MOZ-LOCATIONPATH:fbd57454-d966-4a14-8341-abe1edb1ae66.ics
+LOCATION:Never never land
+END:VEVENT
+BEGIN:VTIMEZONE
+TZID:/mozilla.org/20050126_1/Antarctica/McMurdo
+X-LIC-LOCATION:Antarctica/McMurdo
+BEGIN:STANDARD
+TZOFFSETFROM:+1300
+TZOFFSETTO:+1200
+TZNAME:NZST
+DTSTART:19700315T030000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=3SU;BYMONTH=3
+END:STANDARD
+BEGIN:DAYLIGHT
+TZOFFSETFROM:+1200
+TZOFFSETTO:+1300
+TZNAME:NZDT
+DTSTART:19701004T020000
+RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=1SU;BYMONTH=10
+END:DAYLIGHT
+END:VTIMEZONE
+END:VCALENDAR
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/219-Moz-REPORT.test b/testing/tests/regression-suite/219-Moz-REPORT.test
new file mode 100644
index 00000000..45a0ff7a
--- /dev/null
+++ b/testing/tests/regression-suite/219-Moz-REPORT.test
@@ -0,0 +1,17 @@
+#
+# Request a REPORT as a user with read/write access
+#
+TYPE=REPORT
+AUTH=assistant1:assistant1
+URL=http://mycaldav/caldav.php/user1/home/
+HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061108 Calendar/0.4a1
+HEADER=Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+HEADER=Accept-Language: en-us,en;q=0.5
+HEADER=Accept-Encoding: gzip,deflate
+HEADER=Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+HEADER=Keep-Alive: 300
+HEADER=Content-Type: text/xml
+HEADER=Depth: 1
+HEAD
+
+DATA=208-Moz-REPORT-5
diff --git a/testing/tests/regression-suite/220-Moz-REPORT.result b/testing/tests/regression-suite/220-Moz-REPORT.result
new file mode 100644
index 00000000..64067c1c
--- /dev/null
+++ b/testing/tests/regression-suite/220-Moz-REPORT.result
@@ -0,0 +1,7 @@
+HTTP/1.1 403 Forbidden
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, access-control, calendar-access
+Content-Length: 34
+Content-Type: text/plain; charset="utf-8"
+
+REPORT body is not valid XML data!
\ No newline at end of file
diff --git a/testing/tests/regression-suite/220-Moz-REPORT.test b/testing/tests/regression-suite/220-Moz-REPORT.test
new file mode 100644
index 00000000..35127ef5
--- /dev/null
+++ b/testing/tests/regression-suite/220-Moz-REPORT.test
@@ -0,0 +1,17 @@
+#
+# Request a REPORT but don't send any actual valid XML data(!)
+#
+TYPE=REPORT
+URL=http://mycaldav/caldav.php/user1/home/
+HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061108 Calendar/0.4a1
+HEADER=Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+HEADER=Accept-Language: en-us,en;q=0.5
+HEADER=Accept-Encoding: gzip,deflate
+HEADER=Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+HEADER=Keep-Alive: 300
+HEADER=Content-Type: text/xml
+HEADER=Depth: 1
+HEAD
+
+BEGINDATA
+ENDDATA