You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ch...@apache.org on 2005/10/08 13:46:23 UTC

svn commit: r307287 - /lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap

Author: chestnut
Date: Sat Oct  8 04:46:17 2005
New Revision: 307287

URL: http://svn.apache.org/viewcvs?rev=307287&view=rev
Log:
Shouldn't be able to lock [LOCK webDAV method] a document that doesn't exist

Modified:
    lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap

Modified: lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap?rev=307287&r1=307286&r2=307287&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap (original)
+++ lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap Sat Oct  8 04:46:17 2005
@@ -224,22 +224,36 @@
       <map:match pattern="PUT/**_*.html">
         <map:call function="put" />  
       </map:match> 
+      
+      
+      <map:match pattern="MKCOL/**">
+        <map:call function="mkcol" />
+      </map:match>
             
       <map:match pattern="DELETE/**">
         <map:call function="remove" />
       </map:match> 
                         
       <map:match pattern="LOCK/**">
-        <map:act type="reserved-checkout">
-          <map:generate src="dummy.xml"/>
-          <map:serialize type="xml"  status-code="423"/>
-        </map:act>
-        <map:generate src="dummy.xml"/>
-        <map:transform type="xslt" src="fallback://lenya/usecases/webdav/lock.xsl">
-          <map:parameter name="userid" value="{access-control:user-id}"/>
-          <map:parameter name="docid" value="{page-envelope:document-id}"/>
-        </map:transform>
-        <map:serialize type="xml" status-code="200" />
+        <map:select type="resource-exists">
+          <map:parameter name="prefix" value="lenya://"/>
+          <map:when test="lenya/pubs/{page-envelope:publication-id}/content/authoring/{page-envelope:document-path}">
+            <map:act type="reserved-checkout">
+              <map:generate src="dummy.xml"/>
+              <map:serialize type="xml"  status-code="423"/>
+            </map:act>
+            <map:generate src="dummy.xml"/>
+            <map:transform type="xslt" src="fallback://lenya/usecases/webdav/lock.xsl">
+              <map:parameter name="userid" value="{access-control:user-id}"/>
+              <map:parameter name="docid" value="{page-envelope:document-id}"/>
+            </map:transform>
+            <map:serialize type="xml" status-code="200" />
+          </map:when>
+          <map:otherwise>
+            <map:generate src="dummy.xml"/>
+            <map:serialize type="xml" status-code="412"/>
+          </map:otherwise>
+        </map:select>
       </map:match>
 
       <map:match pattern="UNLOCK/**">



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org