jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1404903 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java
Date Fri, 02 Nov 2012 09:50:56 GMT
Author: angela
Date: Fri Nov  2 09:50:56 2012
New Revision: 1404903

URL: http://svn.apache.org/viewvc?rev=1404903&view=rev
Log:
OAK-50 : Implement User Management (WIP)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java?rev=1404903&r1=1404902&r2=1404903&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java
Fri Nov  2 09:50:56 2012
@@ -28,6 +28,7 @@ import org.apache.jackrabbit.oak.api.Pro
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.api.TreeLocation;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
+import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
 import org.apache.jackrabbit.oak.plugins.name.NamespaceConstants;
 import org.apache.jackrabbit.oak.plugins.value.ValueFactoryImpl;
 import org.apache.jackrabbit.oak.util.NodeUtil;
@@ -122,7 +123,8 @@ class OakAuthorizableProperties implemen
                 n.removeProperty(name);
             }
         }
-        n.setProperty(name, value);
+        PropertyState propertyState = PropertyStates.createProperty(name, value);
+        n.setProperty(propertyState);
     }
 
     /**
@@ -143,7 +145,8 @@ class OakAuthorizableProperties implemen
                 n.removeProperty(name);
             }
         }
-        n.setProperty(name, values);
+        PropertyState propertyState = PropertyStates.createProperty(name, values);
+        n.setProperty(propertyState);
     }
 
     /**
@@ -202,7 +205,7 @@ class OakAuthorizableProperties implemen
         // FIXME: add proper check for protection and declaring nt of the
         // FIXME: property using nt functionality provided by nt-plugins
         String prefix = Text.getNamespacePrefix(property.getName());
-        return NamespaceConstants.RESERVED_PREFIXES.contains(prefix);
+        return !NamespaceConstants.RESERVED_PREFIXES.contains(prefix);
     }
 
     /**



Mime
View raw message