incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r886146 - /sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
Date Wed, 02 Dec 2009 13:57:56 GMT
Author: fmeschbe
Date: Wed Dec  2 13:57:56 2009
New Revision: 886146

URL: http://svn.apache.org/viewvc?rev=886146&view=rev
Log:
SLING-1208 Wrong commit, we should not re-add the rep:principalName property

Modified:
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java?rev=886146&r1=886145&r2=886146&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java
Wed Dec  2 13:57:56 2009
@@ -44,14 +44,6 @@
 public class AuthorizableValueMap implements ValueMap {
     private Logger logger = LoggerFactory.getLogger(AuthorizableValueMap.class);
 
-    /**
-     * Principal Name property of the Authorizable. This has been returned
-     * before Jackrabbit 1.6 as part of the Authorizable properties but is
-     * now removed from the set. We add this to the properties again to be
-     * able to convey this data to the request.
-     */
-    private static final String REP_PRINCIPAL_NAME = "rep:principalName";
-
     private boolean fullyRead;
 
     private final Map<String, Object> cache;
@@ -142,17 +134,9 @@
         }
 
         try {
-            final Object value;
-            if (REP_PRINCIPAL_NAME.equals(key)) {
-                value = authorizable.getPrincipal().getName();
-            } else  if (authorizable.hasProperty(key)) {
+            if (authorizable.hasProperty(key)) {
                 final Value[] property = authorizable.getProperty(key);
-                value = valuesToJavaObject(property);
-            } else {
-                value = null;
-            }
-
-            if (value != null) {
+                final Object value = valuesToJavaObject(property);
                 cache.put(key, value);
                 return value;
             }
@@ -193,12 +177,6 @@
                     }
                 }
 
-                // add principal name
-                if (!cache.containsKey(REP_PRINCIPAL_NAME)) {
-                    cache.put(REP_PRINCIPAL_NAME,
-                        authorizable.getPrincipal().getName());
-                }
-
                 fullyRead = true;
             } catch (RepositoryException re) {
                 // TODO: log !!



Mime
View raw message