juergen     2002/06/24 04:23:49

  Added:       
testsuite/testsuite/junit/xmltestcases/ACL/functional/Principle/EitherReadorWriteFileDifferentToCollection
                        ACLGrantWriteGetColFile.xml
                        ACLGrantWriteDeleteColFile.xml
                        ACLdenyWriteGetColFile.xml
                        ACLdenyWriteDeleteColFile.xml
  Log:
  New ACL test cases
  
  Revision  Changes    Path
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/Principle/EitherReadorWriteFileDifferentToCollection/ACLGrantWriteGetColFile.xml
  
  Index: ACLGrantWriteGetColFile.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract> Test to check if possible to Get file and collection with 
and without wrtie privilege </abstract>
                
                <description>
                1) MKCOL command which creates a child collection (/test)
                2) PUT command which creates a child file (/test/test.xml)
                3) ACL command which grants write access to the user %user% on the 
child collection
                3) ACL command which denys write access to the user %user% on the 
child file
                4) Get command attempted on child file
                5) Get command attempted on child file
                </description>
                
                <expectedResult> Two Get commands should both return 200 OK 
</expectedResult>
        </specification>
        
        
     <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <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>
   
   <step>
   <user varUsage="user">2%user%</user>
   <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/test/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>
    </response>
   </step>
  
  <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/test 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 /></D:privilege>
              </D:grant>
           </D:ace>
        </D:acl>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 200 OK</command>
    </response>
   </step>
   
   <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/test/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 /></D:privilege>
              </D:deny>
           </D:ace>
        
           <D:ace>
              <D:principal>
                 <D:href>/administration/security/users/%host%/%user%</D:href>
              </D:principal>
              <D:grant>
                 <D:privilege><D:read /></D:privilege>
              </D:grant>
           </D:ace>
        
        </D:acl>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 200 OK</command>
    </response>
   </step>
    
         <step>
            <request>
               <command 
varUsage="globalVariableCollection,userNumber,globalVariableServerName">GET 
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml HTTP/1.1</command>
             <header>Accept: */*</header>
             <header>Accept-Language: en-us</header>
             <header>Accept-Encoding: gzip, deflate</header>
             <header>User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 
4.0)</header>
             <header>Connection: Keep-Alive</header>
          </request>
          <response>
             <command>HTTP/1.0 200 OK</command>
             <body />
          </response>
         </step>
   
         <step>
            <request>
               <command 
varUsage="globalVariableCollection,userNumber,globalVariableServerName">GET 
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml HTTP/1.1</command>
             <header>Accept: */*</header>
             <header>Accept-Language: en-us</header>
             <header>Accept-Encoding: gzip, deflate</header>
             <header>User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 
4.0)</header>
             <header>Connection: Keep-Alive</header>
          </request>
          <response>
             <command>HTTP/1.0 200 OK</command>
             <body />
          </response>
         </step>
         
    <cleanup>
    
    <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/ 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>
   
     <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command 
varUsage="repeatCounter,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: Tue, 13 Feb 2001 17:14:41 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>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/Principle/EitherReadorWriteFileDifferentToCollection/ACLGrantWriteDeleteColFile.xml
  
  Index: ACLGrantWriteDeleteColFile.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract> Test to check if possible to delete file and collection 
with and without wrtie privilege </abstract>
                
                <description>
                1) MKCOL command which creates a child collection (/test)
                2) PUT command which creates a child file (/test/test.xml)
                3) ACL command which grants write access to the user %user% on the 
child collection
                3) ACL command which denys write access to the user %user% on the 
child file
                4) Delete command attempted on child file
                5) Delete command attempted on child file
                </description>
                
                <expectedResult> Two Delete commands should both return 204 No Content 
</expectedResult>
        </specification>
        
        
     <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <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>
   
   <step>
   <user varUsage="user">2%user%</user>
   <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/test/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>
    </response>
   </step>
  
  <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/test 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 /></D:privilege>
              </D:grant>
           </D:ace>
        </D:acl>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 200 OK</command>
    </response>
   </step>
   
   <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/test/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 /></D:privilege>
              </D:deny>
           </D:ace>
        
           <D:ace>
              <D:principal>
                 <D:href>/administration/security/users/%host%/%user%</D:href>
              </D:principal>
              <D:grant>
                 <D:privilege><D:read /></D:privilege>
              </D:grant>
           </D:ace>
        
        </D:acl>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 200 OK</command>
    </response>
   </step>
    
      <step>
    <request>
     <command 
varUsage="repeatCounter,globalVariableCollection,globalVariableServerName">DELETE 
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml 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>
    </response>
   </step>
   
      <step>
    <request>
     <command 
varUsage="repeatCounter,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>
    </response>
   </step>
         
    <cleanup>
    
    <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/ 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>
   
     <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command 
varUsage="repeatCounter,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: Tue, 13 Feb 2001 17:14:41 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>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/Principle/EitherReadorWriteFileDifferentToCollection/ACLdenyWriteGetColFile.xml
  
  Index: ACLdenyWriteGetColFile.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract> Test to check if possible to Get file and collection with 
and without wrtie privilege </abstract>
                
                <description>
                1) MKCOL command which creates a child collection (/test)
                2) PUT command which creates a child file (/test/test.xml)
                3) ACL command which denys write access to the user %user% on the 
child collection
                3) ACL command which denys read access to the user %user% on the child 
file
                4) Get command attempted on child file
                5) Get command attempted on child file
                </description>
                
                <expectedResult> Two Get commands should both return 403 Forbidden 
</expectedResult>
        </specification>
        
        
     <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <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>
   
   <step>
   <user varUsage="user">2%user%</user>
   <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/test/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>
    </response>
   </step>
  
  <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/test 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 /></D:privilege>
              </D:deny>
           </D:ace>
        </D:acl>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 200 OK</command>
    </response>
   </step>
   
   <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/test/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 /></D:privilege>
              </D:grant>
           </D:ace>
        
         <D:ace>
              <D:principal>
                 <D:href>/administration/security/users/%host%/%user%</D:href>
              </D:principal>
              <D:deny>
                 <D:privilege><D:read /></D:privilege>
              </D:deny>
           </D:ace>     
        
        </D:acl>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 200 OK</command>
    </response>
   </step>
    
         <step>
            <request>
               <command 
varUsage="globalVariableCollection,userNumber,globalVariableServerName">GET 
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml HTTP/1.1</command>
             <header>Accept: */*</header>
             <header>Accept-Language: en-us</header>
             <header>Accept-Encoding: gzip, deflate</header>
             <header>User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 
4.0)</header>
             <header>Connection: Keep-Alive</header>
          </request>
          <response>
             <command>HTTP/1.0 403 Forbidden</command>
             <body />
          </response>
         </step>
   
         <step>
            <request>
               <command 
varUsage="globalVariableCollection,userNumber,globalVariableServerName">GET 
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml HTTP/1.1</command>
             <header>Accept: */*</header>
             <header>Accept-Language: en-us</header>
             <header>Accept-Encoding: gzip, deflate</header>
             <header>User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 
4.0)</header>
             <header>Connection: Keep-Alive</header>
          </request>
          <response>
             <command>HTTP/1.0 403 Forbidden</command>
             <body />
          </response>
         </step>
         
    <cleanup>
    
    <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/ 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>
   
     <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command 
varUsage="repeatCounter,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: Tue, 13 Feb 2001 17:14:41 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>
  
  
  
  1.1                  
jakarta-slide/testsuite/testsuite/junit/xmltestcases/ACL/functional/Principle/EitherReadorWriteFileDifferentToCollection/ACLdenyWriteDeleteColFile.xml
  
  Index: ACLdenyWriteDeleteColFile.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE test SYSTEM "../../../../../Tprocessor.dtd">
      
  <test>
  
        <specification>
                <abstract> Test to check if possible to delete file and collection 
with and without wrtie privilege </abstract>
                
                <description>
                1) MKCOL command which creates a child collection (/test)
                2) PUT command which creates a child file (/test/test.xml)
                3) ACL command which denys write access to the user %user% on the 
child collection
                3) ACL command which denys read access to the user %user% on the child 
file
                4) Delete command attempted on child file
                5) Delete command attempted on child file
                </description>
                
                <expectedResult> Two Delete commands should both return 403 Forbidden 
</expectedResult>
        </specification>
        
        
     <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <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>
   
   <step>
   <user varUsage="user">2%user%</user>
   <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">PUT 
/%globalVariableServerName%/%globalVariableCollection%/test/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>
    </response>
   </step>
  
  <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/test 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 /></D:privilege>
              </D:deny>
           </D:ace>
        </D:acl>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 200 OK</command>
    </response>
   </step>
   
   
   <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/test/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 /></D:privilege>
              </D:grant>
           </D:ace>
        
         <D:ace>
              <D:principal>
                 <D:href>/administration/security/users/%host%/%user%</D:href>
              </D:principal>
              <D:deny>
                 <D:privilege><D:read /></D:privilege>
              </D:deny>
           </D:ace>     
        
        </D:acl>]]>
     </body>
    </request>
    <response>
     <command>HTTP/1.0 200 OK</command>
    </response>
   </step>
    
      <step>
    <request>
     <command 
varUsage="repeatCounter,globalVariableCollection,globalVariableServerName">DELETE 
/%globalVariableServerName%/%globalVariableCollection%/test/test.xml 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 403 Forbidden</command>
    </response>
   </step>
   
      <step>
    <request>
     <command 
varUsage="repeatCounter,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 403 Forbidden</command>
    </response>
   </step>
         
    <cleanup>
    
    <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command varUsage="globalVariableCollection,globalVariableServerName">ACL 
/%globalVariableServerName%/%globalVariableCollection%/ 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>
   
     <step>
  <user varUsage="user">2%user%</user>
  <password varUsage="user">2%user%</password>
    <request>
     <command 
varUsage="repeatCounter,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: Tue, 13 Feb 2001 17:14:41 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]>

Reply via email to