This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.jcr.davex-1.3.4
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-davex.git

commit e07dbcc06674d7b065d44a4a6b800741fb02e3d5
Author: Stefan Egli <[email protected]>
AuthorDate: Fri Mar 11 11:17:38 2016 +0000

    SLING-5596 : Patch provided by Davide Giannella which adds a 
dav.protectedHandlers config with a default of AclRemoveHandler to the 
SlingDavExServlet - avoids having no config for the JCR ProtectedRemoveManager
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/davex@1734534 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/jcr/davex/impl/servlets/SlingDavExServlet.java   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git 
a/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java 
b/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
index a215bea..0aba2d1 100644
--- 
a/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
+++ 
b/src/main/java/org/apache/sling/jcr/davex/impl/servlets/SlingDavExServlet.java
@@ -120,10 +120,22 @@ public class SlingDavExServlet extends JcrRemotingServlet 
{
      */
     private ServiceRegistration dummyService;
 
+    /**
+     * Default value for the configuration {@link #PROP_PROTECTED_HANDLERS}
+     */
+    public static final String DEFAULT_PROTECTED_HANDLERS = 
"org.apache.jackrabbit.server.remoting.davex.AclRemoveHandler";
+
+    /**
+     * defines the Protected handlers for the Jcr Remoting Servlet
+     */
+    @Property(value=DEFAULT_PROTECTED_HANDLERS)
+    public static final String PROP_PROTECTED_HANDLERS = 
"dav.protectedhandlers";
+    
     @Activate
     protected void activate(final BundleContext bundleContext, final 
Map<String, ?> config) {
         final String davRoot = OsgiUtil.toString(config.get(PROP_DAV_ROOT), 
DEFAULT_DAV_ROOT);
         final boolean createAbsoluteUri = 
OsgiUtil.toBoolean(config.get(PROP_CREATE_ABSOLUTE_URI), 
DEFAULT_CREATE_ABSOLUTE_URI);
+        final String protectedHandlers = 
OsgiUtil.toString(config.get(PROP_PROTECTED_HANDLERS), 
DEFAULT_PROTECTED_HANDLERS);
 
         final AuthHttpContext context = new AuthHttpContext(davRoot);
         context.setAuthenticationSupport(authSupport);
@@ -139,6 +151,8 @@ public class SlingDavExServlet extends JcrRemotingServlet {
 
         // disable CSRF checks for now (should be handled by Sling)
         initProps.put(INIT_PARAM_CSRF_PROTECTION, CSRFUtil.DISABLED);
+        
+        initProps.put(INIT_PARAM_PROTECTED_HANDLERS_CONFIG, protectedHandlers);
 
         // register and handle registration failure
         try {

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to