[CalendarServer-changes] [3495] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue Dec 9 20:31:07 PST 2008


Revision: 3495
          http://trac.macosforge.org/projects/calendarserver/changeset/3495
Author:   cdaboo at apple.com
Date:     2008-12-09 20:31:06 -0800 (Tue, 09 Dec 2008)
Log Message:
-----------
Tests for allowing admin principals full access to private event data.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/privateevents.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/privateevents/49.ics
    CalDAVTester/trunk/Resource/privateevents/50.ics

Added: CalDAVTester/trunk/Resource/privateevents/49.ics
===================================================================
--- CalDAVTester/trunk/Resource/privateevents/49.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/privateevents/49.ics	2008-12-10 04:31:06 UTC (rev 3495)
@@ -0,0 +1,40 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+X-CALENDARSERVER-ACCESS:CONFIDENTIAL
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T205953Z
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT1H
+SUMMARY:event confidential access 2
+LOCATION:confidential 2
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE;SCHEDULE-STATUS="1.2;Scheduling message has been delivered":mailt
+ o:user02 at example.com
+UID:54E181BC7CCC373042B28842FFC-40 at ninevah.local
+BEGIN:VALARM
+ACTION:DISPLAY
+DESCRIPTION:Test
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/privateevents/50.ics
===================================================================
--- CalDAVTester/trunk/Resource/privateevents/50.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/privateevents/50.ics	2008-12-10 04:31:06 UTC (rev 3495)
@@ -0,0 +1,40 @@
+BEGIN:VCALENDAR
+CALSCALE:GREGORIAN
+PRODID:-//Example Inc.//Example Calendar//EN
+VERSION:2.0
+X-CALENDARSERVER-ACCESS:RESTRICTED
+BEGIN:VTIMEZONE
+LAST-MODIFIED:20040110T032845Z
+TZID:US/Eastern
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+END:VTIMEZONE
+BEGIN:VEVENT
+DTSTAMP:20051222T205953Z
+DTSTART;TZID=US/Eastern:20060101T100000
+DURATION:PT1H
+SUMMARY:event restricted access 2
+LOCATION:restricted 2
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE;SCHEDULE-STATUS="1.2;Scheduling message has been delivered":mailt
+ o:user02 at example.com
+UID:54E181BC7CCC373042B28842FFD-42 at ninevah.local
+BEGIN:VALARM
+ACTION:DISPLAY
+DESCRIPTION:Test
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR

Modified: CalDAVTester/trunk/scripts/tests/privateevents.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/privateevents.xml	2008-12-10 04:30:09 UTC (rev 3494)
+++ CalDAVTester/trunk/scripts/tests/privateevents.xml	2008-12-10 04:31:06 UTC (rev 3495)
@@ -3,7 +3,7 @@
 <!DOCTYPE caldavtest SYSTEM "caldavtest.dtd">
 
 <!--
- Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+ Copyright (c) 2006-2008 Apple Inc. All rights reserved.
 
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
@@ -3711,6 +3711,280 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Admin access' ignore='no'>
+		<test name='1'>
+			<description>GET by admin normal</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>GET</method>
+				<ruri>$pathprefix1:/sharedcalendar/1.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/privateevents/5.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2'>
+			<description>GET by admin PUBLIC</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>GET</method>
+				<ruri>$pathprefix1:/sharedcalendar/2.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/privateevents/6.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='3'>
+			<description>GET by admin PRIVATE</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>GET</method>
+				<ruri>$pathprefix1:/sharedcalendar/3.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/privateevents/8.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='4'>
+			<description>GET by admin RESTRICTED</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>GET</method>
+				<ruri>$pathprefix1:/sharedcalendar/4.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/privateevents/49.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='5'>
+			<description>GET by admin CONFIDENTIAL</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>GET</method>
+				<ruri>$pathprefix1:/sharedcalendar/5.ics</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/privateevents/50.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='6'>
+			<description>multiget by admin PUBLIC</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/sharedcalendar/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/privateevents/15.xml</filepath>
+				</data>
+				<verify>
+					<callback>dataString</callback>
+					<arg>
+						<name>contains</name>
+						<value>X-CALENDARSERVER-ACCESS:PUBLIC</value>
+						<value>VERSION:2.0</value>
+						<value>DTSTART;TZID=US/Eastern:20060101T100000</value>
+						<value>SUMMARY:event public access</value>
+						<value>BEGIN:VALARM</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='7'>
+			<description>multiget by admin PRIVATE</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/sharedcalendar/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/privateevents/14.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>okhrefs</name>
+						<value>1.ics</value>
+						<value>2.ics</value>
+						<value>3.ics</value>
+						<value>4.ics</value>
+						<value>5.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='8'>
+			<description>multiget by admin CONFIDENTIAL</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/sharedcalendar/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/privateevents/16.xml</filepath>
+				</data>
+				<verify>
+					<callback>dataString</callback>
+					<arg>
+						<name>contains</name>
+						<value>X-CALENDARSERVER-ACCESS:CONFIDENTIAL</value>
+						<value>VERSION:2.0</value>
+						<value>DTSTART;TZID=US/Eastern:20060101T100000</value>
+						<value>SUMMARY:event confidential access 2</value>
+						<value>LOCATION:confidential 2</value>
+						<value>ORGANIZER:mailto:user01 at example.com</value>
+						<value>BEGIN:VALARM</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='9'>
+			<description>multiget by admin RESTRICTED</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/sharedcalendar/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/privateevents/19.xml</filepath>
+				</data>
+				<verify>
+					<callback>dataString</callback>
+					<arg>
+						<name>contains</name>
+						<value>X-CALENDARSERVER-ACCESS:RESTRICTED</value>
+						<value>VERSION:2.0</value>
+						<value>SUMMARY:event restricted access 2</value>
+						<value>LOCATION:restricted 2</value>
+						<value>ORGANIZER:mailto:user01 at example.com</value>
+						<value>BEGIN:VALARM</value>
+					</arg>
+					<arg>
+						<name>notcontains</name>
+						<value>DTSTART;TZID=US/Eastern:20060101T100000</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='10'>
+			<description>query by admin PUBLIC</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/sharedcalendar/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/privateevents/21.xml</filepath>
+				</data>
+				<verify>
+					<callback>dataString</callback>
+					<arg>
+						<name>contains</name>
+						<value>X-CALENDARSERVER-ACCESS:PUBLIC</value>
+						<value>VERSION:2.0</value>
+						<value>DTSTART;TZID=US/Eastern:20060101T100000</value>
+						<value>SUMMARY:event public access</value>
+						<value>BEGIN:VALARM</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='11'>
+			<description>query by admin PRIVATE</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/sharedcalendar/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/privateevents/20.xml</filepath>
+				</data>
+				<verify>
+					<callback>multistatusItems</callback>
+					<arg>
+						<name>okhrefs</name>
+						<value>1.ics</value>
+						<value>2.ics</value>
+						<value>3.ics</value>
+						<value>4.ics</value>
+						<value>5.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='12'>
+			<description>query by admin CONFIDENTIAL</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/sharedcalendar/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/privateevents/22.xml</filepath>
+				</data>
+				<verify>
+					<callback>dataString</callback>
+					<arg>
+						<name>contains</name>
+						<value>X-CALENDARSERVER-ACCESS:CONFIDENTIAL</value>
+						<value>VERSION:2.0</value>
+						<value>DTSTART;TZID=US/Eastern:20060101T100000</value>
+						<value>SUMMARY:event confidential access 2</value>
+						<value>LOCATION:confidential 2</value>
+						<value>ORGANIZER:mailto:user01 at example.com</value>
+						<value>BEGIN:VALARM</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='13'>
+			<description>multiget by admin RESTRICTED</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>REPORT</method>
+				<ruri>$pathprefix1:/sharedcalendar/</ruri>
+				<data>
+					<content-type>text/xml; charset=utf-8</content-type>
+					<filepath>Resource/privateevents/17.xml</filepath>
+				</data>
+				<verify>
+					<callback>dataString</callback>
+					<arg>
+						<name>contains</name>
+						<value>X-CALENDARSERVER-ACCESS:RESTRICTED</value>
+						<value>VERSION:2.0</value>
+						<value>DTSTART;TZID=US/Eastern:20060101T100000</value>
+						<value>SUMMARY:event restricted access 2</value>
+						<value>LOCATION:restricted 2</value>
+						<value>ORGANIZER:mailto:user01 at example.com</value>
+						<value>BEGIN:VALARM</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='14'>
+			<description>Rolled-up get by admin</description>
+			<request user="$useradmin:" pswd="$pswdadmin:" print-response="no">
+				<method>GET</method>
+				<ruri>$pathprefix1:/rolledcalendar/</ruri>
+				<verify>
+					<callback>calendarDataMatch</callback>
+					<arg>
+						<name>filepath</name>
+						<value>Resource/privateevents/38.ics</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
 	<end/>
 
 </caldavtest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081209/e8082ecd/attachment-0001.html>


More information about the calendarserver-changes mailing list