[CalendarServer-changes] [2290] CalDAVTester/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Apr 9 10:59:00 PDT 2008
Revision: 2290
http://trac.macosforge.org/projects/calendarserver/changeset/2290
Author: cdaboo at apple.com
Date: 2008-04-09 10:58:59 -0700 (Wed, 09 Apr 2008)
Log Message:
-----------
Test to ensure that inheritable state of protected DAV:ace's is not lost when processing an ACL method request.
Modified Paths:
--------------
CalDAVTester/trunk/scripts/tests/acl.xml
Added Paths:
-----------
CalDAVTester/trunk/Resource/acls/23.xml
CalDAVTester/trunk/Resource/acls/24.xml
CalDAVTester/trunk/Resource/acls/25.xml
Added: CalDAVTester/trunk/Resource/acls/23.xml
===================================================================
--- CalDAVTester/trunk/Resource/acls/23.xml (rev 0)
+++ CalDAVTester/trunk/Resource/acls/23.xml 2008-04-09 17:58:59 UTC (rev 2290)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:acl xmlns:D="DAV:">
+ <D:ace>
+ <D:principal>
+ <D:href>$principaluri1:</D:href>
+ </D:principal>
+ <D:grant>
+ <D:privilege><D:read/></D:privilege>
+ <D:privilege><D:read-current-user-privilege-set/></D:privilege>
+ </D:grant>
+ </D:ace>
+</D:acl>
Added: CalDAVTester/trunk/Resource/acls/24.xml
===================================================================
--- CalDAVTester/trunk/Resource/acls/24.xml (rev 0)
+++ CalDAVTester/trunk/Resource/acls/24.xml 2008-04-09 17:58:59 UTC (rev 2290)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:propfind xmlns:D="DAV:">
+<D:prop>
+<D:current-user-privilege-set/>
+<D:acl/>
+</D:prop>
+</D:propfind>
Added: CalDAVTester/trunk/Resource/acls/25.xml
===================================================================
--- CalDAVTester/trunk/Resource/acls/25.xml (rev 0)
+++ CalDAVTester/trunk/Resource/acls/25.xml 2008-04-09 17:58:59 UTC (rev 2290)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<D:acl xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:T="http://twistedmatrix.com/xml_namespace/dav/">
+ <D:ace>
+ <D:principal>
+ <D:authenticated/>
+ </D:principal>
+ <D:grant>
+ <D:privilege><D:read/></D:privilege>
+ </D:grant>
+ </D:ace>
+ <D:ace>
+ <D:principal>
+ <D:authenticated/>
+ </D:principal>
+ <D:grant>
+ <D:privilege><C:read-free-busy/></D:privilege>
+ </D:grant>
+ <T:inheritable/>
+ </D:ace>
+</D:acl>
Modified: CalDAVTester/trunk/scripts/tests/acl.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/acl.xml 2008-04-09 17:58:03 UTC (rev 2289)
+++ CalDAVTester/trunk/scripts/tests/acl.xml 2008-04-09 17:58:59 UTC (rev 2290)
@@ -1020,6 +1020,132 @@
</test>
</test-suite>
+ <test-suite name='ACL calendar home' ignore='no'>
+ <test name='1' ignore='no'>
+ <description>Set read/read-current-user-privilege-set on home only</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>ACL</method>
+ <ruri>$pathprefix2:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/acls/23.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='2' ignore='no'>
+ <description>Check for current-user-privilege-set on calendar home as user01</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>$pathprefix2:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/acls/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>DAV:current-user-privilege-set</value>
+ </arg>
+ <arg>
+ <name>badprops</name>
+ <value>DAV:acl</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='3' ignore='no'>
+ <description>Check that calendar privileges are still inherited for user02</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>$pathprefix2:/calreadtoauth/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/acls/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>DAV:current-user-privilege-set</value>
+ <value>DAV:acl</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='4' ignore='no'>
+ <description>Remove read/read-current-user-privilege-set on home only</description>
+ <request user="$userid2:" pswd="$pswd2:">
+ <method>ACL</method>
+ <ruri>$pathprefix2:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/acls/25.xml</filepath>
+ </data>
+ <verify>
+ <callback>statusCode</callback>
+ </verify>
+ </request>
+ </test>
+ <test name='5' ignore='no'>
+ <description>Check no current-user-privilege-set on calendar home as user01</description>
+ <request print-response='no'>
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>$pathprefix2:/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/acls/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>badprops</name>
+ <value>DAV:current-user-privilege-set</value>
+ <value>DAV:acl</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ <test name='6' ignore='no'>
+ <description>Check that calendar privileges are still inherited for user02</description>
+ <request user="$userid2:" pswd="$pswd2:" print-response='no'>
+ <method>PROPFIND</method>
+ <header>
+ <name>Depth</name>
+ <value>0</value>
+ </header>
+ <ruri>$pathprefix2:/calreadtoauth/</ruri>
+ <data>
+ <content-type>text/xml; charset=utf-8</content-type>
+ <filepath>Resource/acls/24.xml</filepath>
+ </data>
+ <verify>
+ <callback>propfindItems</callback>
+ <arg>
+ <name>okprops</name>
+ <value>DAV:current-user-privilege-set</value>
+ <value>DAV:acl</value>
+ </arg>
+ </verify>
+ </request>
+ </test>
+ </test-suite>
+
<end>
<request user="$userid2:" pswd="$pswd2:">
<method>DELETE</method>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080409/5ebcd073/attachment.html
More information about the calendarserver-changes
mailing list