jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1448348 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: security/authorization/restriction/ spi/security/authorization/restriction/
Date Wed, 20 Feb 2013 18:49:03 GMT
Author: angela
Date: Wed Feb 20 18:49:03 2013
New Revision: 1448348

URL: http://svn.apache.org/r1448348
Log:
OAK-51 : Access Control Management (remove unnecessary access control exception)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/PrincipalRestrictionProvider.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/RestrictionProviderImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/RestrictionProvider.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/PrincipalRestrictionProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/PrincipalRestrictionProvider.java?rev=1448348&r1=1448347&r2=1448348&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/PrincipalRestrictionProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/PrincipalRestrictionProvider.java
Wed Feb 20 18:49:03 2013
@@ -63,7 +63,7 @@ public class PrincipalRestrictionProvide
     }
 
     @Override
-    public Set<Restriction> readRestrictions(String oakPath, Tree aceTree) throws AccessControlException
{
+    public Set<Restriction> readRestrictions(String oakPath, Tree aceTree) {
         Set<Restriction> restrictions = new HashSet<Restriction>(base.readRestrictions(oakPath,
aceTree));
         String value = (oakPath == null) ? "" : oakPath;
         PropertyState nodePathProp = PropertyStates.createProperty(REP_NODE_PATH, value,
Type.PATH);

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/RestrictionProviderImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/RestrictionProviderImpl.java?rev=1448348&r1=1448347&r2=1448348&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/RestrictionProviderImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/restriction/RestrictionProviderImpl.java
Wed Feb 20 18:49:03 2013
@@ -87,7 +87,7 @@ public class RestrictionProviderImpl imp
     }
 
     @Override
-    public Set<Restriction> readRestrictions(String oakPath, Tree aceTree) throws AccessControlException
{
+    public Set<Restriction> readRestrictions(String oakPath, Tree aceTree) {
         if (oakPath == null) {
             return Collections.emptySet();
         } else {
@@ -106,7 +106,7 @@ public class RestrictionProviderImpl imp
     }
 
     @Override
-    public void writeRestrictions(String oakPath, Tree aceTree, Set<Restriction> restrictions)
throws AccessControlException {
+    public void writeRestrictions(String oakPath, Tree aceTree, Set<Restriction> restrictions)
{
         // validation of the restrictions is delegated to the commit hook
         // see #validateRestrictions below
         if (!restrictions.isEmpty()) {
@@ -120,7 +120,7 @@ public class RestrictionProviderImpl imp
 
     @Override
     public void validateRestrictions(String oakPath, Tree aceTree) throws javax.jcr.security.AccessControlException
{
-        Map<String,PropertyState> restrictionProperties = getRestrictionProperties(aceTree);
+        Map<String, PropertyState> restrictionProperties = getRestrictionProperties(aceTree);
         if (oakPath == null && !restrictionProperties.isEmpty()) {
             throw new AccessControlException("Restrictions not supported with 'null' path.");
         }
@@ -132,7 +132,7 @@ public class RestrictionProviderImpl imp
             }
             int type = entry.getValue().getType().tag();
             if (type != def.getRequiredType()) {
-                throw new AccessControlException("Invalid restriction type '"+PropertyType.nameFromValue(type)+"'.
Expected " + PropertyType.nameFromValue(def.getRequiredType()));
+                throw new AccessControlException("Invalid restriction type '" + PropertyType.nameFromValue(type)
+ "'. Expected " + PropertyType.nameFromValue(def.getRequiredType()));
             }
         }
         for (RestrictionDefinition def : supported.values()) {
@@ -145,7 +145,7 @@ public class RestrictionProviderImpl imp
     //------------------------------------------------------------< private >---
     @Nonnull
     private Restriction createRestriction(PropertyState propertyState, boolean isMandatory)
{
-        return new RestrictionImpl(propertyState,  isMandatory, namePathMapper);
+        return new RestrictionImpl(propertyState, isMandatory, namePathMapper);
     }
 
     @Nonnull
@@ -161,7 +161,7 @@ public class RestrictionProviderImpl imp
     @Nonnull
     private Map<String, PropertyState> getRestrictionProperties(Tree aceTree) {
         Tree rTree = getRestrictionsTree(aceTree);
-        Map<String,PropertyState> restrictionProperties = new HashMap<String, PropertyState>();
+        Map<String, PropertyState> restrictionProperties = new HashMap<String, PropertyState>();
         for (PropertyState property : rTree.getProperties()) {
             String name = property.getName();
             if (isRestrictionProperty(name)) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/RestrictionProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/RestrictionProvider.java?rev=1448348&r1=1448347&r2=1448348&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/RestrictionProvider.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authorization/restriction/RestrictionProvider.java
Wed Feb 20 18:49:03 2013
@@ -38,7 +38,7 @@ public interface RestrictionProvider {
                                   @Nonnull String jcrName, @Nonnull Value value) throws RepositoryException;
 
     @Nonnull
-    Set<Restriction> readRestrictions(@Nullable String oakPath, @Nonnull Tree aceTree)
throws AccessControlException;
+    Set<Restriction> readRestrictions(@Nullable String oakPath, @Nonnull Tree aceTree);
 
     void writeRestrictions(String oakPath, Tree aceTree, Set<Restriction> restrictions)
throws AccessControlException;
 



Mime
View raw message