jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1374167 - in /jackrabbit/oak/trunk: oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableImpl.java
Date Fri, 17 Aug 2012 07:36:28 GMT
Author: angela
Date: Fri Aug 17 07:36:27 2012
New Revision: 1374167

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

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd?rev=1374167&r1=1374166&r2=1374167&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/resources/org/apache/jackrabbit/oak/plugins/type/builtin_nodetypes.cnd
Fri Aug 17 07:36:27 2012
@@ -596,7 +596,8 @@
 [rep:Authorizable] > mix:referenceable, nt:hierarchyNode
   abstract
   + * (nt:base) = nt:unstructured VERSION
-  - rep:principalName (STRING) protected mandatory
+  - rep:principalName  (STRING) protected mandatory
+  - rep:authorizableId (STRING) protected
   - * (UNDEFINED)
   - * (UNDEFINED) multiple
 

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableImpl.java?rev=1374167&r1=1374166&r2=1374167&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/AuthorizableImpl.java
Fri Aug 17 07:36:27 2012
@@ -313,15 +313,13 @@ abstract class AuthorizableImpl implemen
      * @throws RepositoryException If no principal name can be retrieved.
      */
     String getPrincipalName() throws RepositoryException {
-        String principalName;
-        String propName = getJcrName(REP_PRINCIPAL_NAME);
-        if (tree.hasProperty(propName)) {
-            principalName = tree.getProperty(propName).getValue().getString();
+        if (tree.hasProperty(REP_PRINCIPAL_NAME)) {
+            return tree.getProperty(REP_PRINCIPAL_NAME).getValue().getString();
         } else {
-            log.debug("Authorizable without principal name -> using ID as fallback.");
-            principalName = getID();
+            String msg = "Authorizable without principal name " + getID();
+            log.warn(msg);
+            throw new RepositoryException(msg);
         }
-        return principalName;
     }
 
     /**



Mime
View raw message