This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.jcr.jackrabbit.usermanager-2.0.4 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-jcr-jackrabbit-usermanager.git
commit d72e1f5800e90b27f57943294042522d15a34db4 Author: Felix Meschberger <[email protected]> AuthorDate: Wed Dec 2 13:57:56 2009 +0000 SLING-1208 Wrong commit, we should not re-add the rep:principalName property git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/jcr/jackrabbit-usermanager@886146 13f79535-47bb-0310-9956-ffa450edef68 --- .../impl/resource/AuthorizableValueMap.java | 26 ++-------------------- 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java index f93834e..c6996c0 100644 --- a/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java +++ b/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/resource/AuthorizableValueMap.java @@ -44,14 +44,6 @@ import org.slf4j.LoggerFactory; 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 @@ public class AuthorizableValueMap implements ValueMap { } 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 @@ public class AuthorizableValueMap implements ValueMap { } } - // add principal name - if (!cache.containsKey(REP_PRINCIPAL_NAME)) { - cache.put(REP_PRINCIPAL_NAME, - authorizable.getPrincipal().getName()); - } - fullyRead = true; } catch (RepositoryException re) { // TODO: log !! -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
