jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1469799 - /jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Date Fri, 19 Apr 2013 12:06:06 GMT
Author: reschke
Date: Fri Apr 19 12:06:05 2013
New Revision: 1469799

URL: http://svn.apache.org/r1469799
Log:
JCR-3575: use absolute paths in WebDAV request bodies (DAV:href elements)

Modified:
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java?rev=1469799&r1=1469798&r2=1469799&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/RepositoryServiceImpl.java
Fri Apr 19 12:06:05 2013
@@ -867,7 +867,7 @@ public class RepositoryServiceImpl imple
     public boolean isGranted(SessionInfo sessionInfo, ItemId itemId, String[] actions) throws
RepositoryException {
         ReportMethod method = null;
         try {
-            String uri = getItemUri(itemId, sessionInfo);
+            String uri = obtainAbsolutePathFromUri(getItemUri(itemId, sessionInfo));
             ReportInfo reportInfo = new ReportInfo(JcrRemotingConstants.REPORT_PRIVILEGES,
ItemResourceConstants.NAMESPACE);
             reportInfo.setContentElement(DomUtil.hrefToXml(uri, DomUtil.createDocument()));
 
@@ -1797,7 +1797,11 @@ public class RepositoryServiceImpl imple
 
                 uInfo = new UpdateInfo(uElem);
             } else {
-                uInfo = new UpdateInfo(updateSource, updateType, new DavPropertyNameSet());
+                String tmpUpdateSource[] = new String[updateSource.length];
+                for (int i = 0; i < updateSource.length; i++) {
+                    tmpUpdateSource[i] = obtainAbsolutePathFromUri(updateSource[i]);
+                }
+                uInfo = new UpdateInfo(tmpUpdateSource, updateType, new DavPropertyNameSet());
             }
 
             UpdateMethod method = new UpdateMethod(uri, uInfo);



Mime
View raw message