jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1466006 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadWriteNamespaceRegistry.java
Date Tue, 09 Apr 2013 12:53:21 GMT
Author: angela
Date: Tue Apr  9 12:53:20 2013
New Revision: 1466006

URL: http://svn.apache.org/r1466006
Log:
OAK-527: permissions (ReadWriteNamespaceRegistry throws RepositoryException when AccessDeniedException
is expected)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadWriteNamespaceRegistry.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadWriteNamespaceRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadWriteNamespaceRegistry.java?rev=1466006&r1=1466005&r2=1466006&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadWriteNamespaceRegistry.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/ReadWriteNamespaceRegistry.java
Tue Apr  9 12:53:20 2013
@@ -18,6 +18,7 @@ package org.apache.jackrabbit.oak.plugin
 
 import java.util.Map;
 
+import javax.jcr.AccessDeniedException;
 import javax.jcr.NamespaceException;
 import javax.jcr.RepositoryException;
 
@@ -103,6 +104,8 @@ public abstract class ReadWriteNamespace
                     + prefix + " to " + uri;
             if (e.isOfType("Namespace")) {
                 throw new NamespaceException(message, e);
+            }  else if (e.isAccessViolation()) {
+                throw new AccessDeniedException(message, e);
             } else {
                 throw new RepositoryException(message, e);
             }
@@ -127,6 +130,8 @@ public abstract class ReadWriteNamespace
             String message = "Failed to unregister namespace mapping for prefix " + prefix;
             if (e.isOfType("Namespace")) {
                 throw new NamespaceException(message, e);
+            } else if (e.isAccessViolation()) {
+                throw new AccessDeniedException(message, e);
             } else {
                 throw new RepositoryException(message, e);
             }



Mime
View raw message