juergen 2002/07/11 03:16:20
Added:
testsuite/testsuite/junit/xmltestcases/ACL/multi-user/DifferentCollections/Deny
writeACL_Single_Resource.xml
Log:
Testcase to check ACL commands in a Multi User environment.
Revision Changes Path
1.1
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/multi-user/DifferentCollections/Deny/writeACL_Single_Resource.xml
Index: writeACL_Single_Resource.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
<test>
<specification>
<abstract> n users attempt to peform an ACL command to grant write-acl
access to a single file
in their own created user collection. </abstract>
<description>
1) MKCol to create 'test' collection. All resources will be created
here. This makes for an easy cleanup.
2) MKCols to create a collection for each user called user1..usern.
3) Put a resource to each user collection.
4) ACL command to grant write-acl privileges to user %user% on all
created resources.
5) ACL command by user %user%, on all created resources, to check that
write-acl privileges have been granted.
6) Begin n threads.
7) ACL command which denies write-acl access to the user %user% to an
individual user collection.
8) ACL command by user %user% to check that write-acl privileges have
been denied.
9) return all access back to default.
10) Delete created resource.
</description>
<expectedResult> Some users ACL commands should return 200 OK, others
will receive a 409 Conflict error. </expectedResult>
</specification>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName"> MKCOL
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet Publishing
Provider DAV</header>
<header>Connection: Keep-Alive</header>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
<header>Date: Wed, 21 Feb 2001 12:55:57 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1;
Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems
Inc.)</header>
</response>
</step>
<repeater varUsage="globalVariableUsers" varDefinition="userNumber"
repeatCount="%globalVariableUsers%">
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">MKCOL
/%globalVariableServerName%/%globalVariableCollection%/test/user%userNumber%
HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet Publishing
Provider DAV</header>
<header>Connection: Keep-Alive</header>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
<header>Date: Wed, 21 Feb 2001 12:55:57 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1;
Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems
Inc.)</header>
</response>
</step>
</repeater>
<repeater varUsage="globalVariableUsers" varDefinition="userNumber"
repeatCount="%globalVariableUsers%">
<step>
<request>
<command
varUsage="userNumber,globalVariableCollection,globalVariableServerName">PUT
/%globalVariableServerName%/%globalVariableCollection%/test/user%userNumber%/test.xml
HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet Publishing Provider
DAV</header>
<header>Connection: Keep-Alive</header>
<body fileReference="../../../contentDirectory/validXML.xm1">
</body>
</request>
<response>
<command>HTTP/1.0 201 Created</command>
<header>Date: Mon, 12 Mar 2001 17:21:35 GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4 (JSP 1.1; Servlet
2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems Inc.)</header>
</response>
</step>
</repeater>
<repeater varUsage="globalVariableUsers" varDefinition="userNumber"
repeatCount="%globalVariableUsers%">
<step>
<user varUsage="user">2%user%</user>
<password varUsage="user">2%user%</password>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName,userNumber">ACL
/%globalVariableServerName%/%globalVariableCollection%/test/user%userNumber%/test.xml
HTTP/1.1</command>
<header>Content-Type: text/xml; charset=utf-8</header>
<header>User-Agent: Jakarta HTTP Client/1.0</header>
<body varUsage="host,user"><![CDATA[<?xml
version="1.0" encoding="utf-8" ?>
<D:acl xmlns:D="DAV:">
<D:ace>
<D:principal>
<D:href>/administration/security/users/%host%/%user%</D:href>
</D:principal>
<D:grant>
<D:privilege><D:write-acl/></D:privilege>
</D:grant>
</D:ace>
</D:acl>]]>
</body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
</response>
</step>
</repeater>
<repeater varUsage="globalVariableUsers" varDefinition="userNumber"
repeatCount="%globalVariableUsers%">
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName,userNumber">ACL
/%globalVariableServerName%/%globalVariableCollection%/test/user%userNumber%/test.xml
HTTP/1.1</command>
<header>Content-Type: text/xml; charset=utf-8</header>
<header>User-Agent: Jakarta HTTP Client/1.0</header>
<body varUsage="host,user"><![CDATA[<?xml version="1.0"
encoding="utf-8" ?>
<D:acl xmlns:D="DAV:">
<D:ace>
<D:principal>
<D:href>/administration/security/users/%host%/2%user%</D:href>
</D:principal>
<D:grant>
<D:privilege><D:write/></D:privilege>
</D:grant>
</D:ace>
</D:acl>]]>
</body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
</response>
</step>
</repeater>
<repeater varUsage="globalVariableUsers" varDefinition="userNumber"
repeatCount="%globalVariableUsers%">
<thread>
<repeater varUsage="globalVariableIterationCount"
repeatCount="%globalVariableIterationCount%">
<step>
<user varUsage="user">2%user%</user>
<password varUsage="user">2%user%</password>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName,userNumber">ACL
/%globalVariableServerName%/%globalVariableCollection%/test/user%userNumber%/test.xml
HTTP/1.1</command>
<header>Content-Type: text/xml; charset=utf-8</header>
<header>User-Agent: Jakarta HTTP Client/1.0</header>
<body varUsage="host,user"><![CDATA[<?xml
version="1.0" encoding="utf-8" ?>
<D:acl xmlns:D="DAV:">
<D:ace>
<D:principal>
<D:href>/administration/security/users/%host%/%user%</D:href>
</D:principal>
<D:deny>
<D:privilege><D:write-acl/></D:privilege>
</D:deny>
</D:ace>
</D:acl>]]>
</body>
</request>
<response>
<command>HTTP/1.0 (200,409) OK</command>
</response>
</step>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName,userNumber">ACL
/%globalVariableServerName%/%globalVariableCollection%/test/user%userNumber%/test.xml
HTTP/1.1</command>
<header>Content-Type: text/xml; charset=utf-8</header>
<header>User-Agent: Jakarta HTTP Client/1.0</header>
<body varUsage="host,user"><![CDATA[<?xml
version="1.0" encoding="utf-8" ?>
<D:acl xmlns:D="DAV:">
<D:ace>
<D:principal>
<D:href>/administration/security/users/%host%/2%user%</D:href>
</D:principal>
<D:grant>
<D:privilege><D:write/></D:privilege>
</D:grant>
</D:ace>
</D:acl>]]>
</body>
</request>
<response>
<command>HTTP/1.0 403 Forbidden</command>
</response>
</step>
</repeater>
</thread>
</repeater>
<cleanup>
<repeater varUsage="globalVariableUsers" varDefinition="userNumber"
repeatCount="%globalVariableUsers%">
<step>
<user varUsage="user">2%user%</user>
<password varUsage="user">2%user%</password>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName,userNumber">ACL
/%globalVariableServerName%/%globalVariableCollection%/test/user%userNumber%/test.xml
HTTP/1.1</command>
<header>Content-Type: text/xml;
charset=utf-8</header>
<header>User-Agent: Jakarta HTTP
Client/1.0</header>
<body
varUsage="globalVariableCollection,globalVariableServerName"><![CDATA[<?xml
version="1.0" encoding="utf-8" ?>
<D:acl xmlns:D="DAV:">
<D:ace>
<D:principal>
<D:all></D:all>
</D:principal>
<D:grant>
<D:privilege><D:all /></D:privilege>
</D:grant>
</D:ace>
</D:acl>]]>
</body>
</request>
<response>
<command>HTTP/1.0 200 OK</command>
</response>
</step>
</repeater>
<step>
<request>
<command
varUsage="globalVariableCollection,globalVariableServerName">DELETE
/%globalVariableServerName%/%globalVariableCollection%/test HTTP/1.1</command>
<header>Accept-Language: en-us</header>
<header>Destroy: NoUndelete</header>
<header>Translate: f</header>
<header>User-Agent: Microsoft Data Access Internet
Publishing Provider DAV</header>
<header>Connection: Keep-Alive</header>
</request>
<response>
<command>HTTP/1.0 204 No Content</command>
<header>Date: Wed, 14 Mar 2001 14:47:37
GMT+01:00</header>
<header>Content-Language: en</header>
<header>Servlet-Engine: Tomcat Web Server/3.2 beta 4
(JSP 1.1; Servlet 2.2; Java 1.3.0; Windows NT 4.0 x86; java.vendor=Sun Microsystems
Inc.)</header>
</response>
</step>
</cleanup>
</test>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>