Update of /var/cvs/src/org/mmbase/security/classsecurity In directory james.mmbase.org:/tmp/cvs-serv4959
Modified Files: ClassAuthentication.java Log Message: removed double wrapping in unmodifiableMap, not using LinkMap, because it does not support values in the second map ,w hich are not mapped in the first one See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/security/classsecurity Index: ClassAuthentication.java =================================================================== RCS file: /var/cvs/src/org/mmbase/security/classsecurity/ClassAuthentication.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -b -r1.24 -r1.25 --- ClassAuthentication.java 20 Oct 2008 14:12:22 -0000 1.24 +++ ClassAuthentication.java 3 Nov 2008 14:00:57 -0000 1.25 @@ -29,7 +29,7 @@ * its configuration file, contains this configuration. * * @author Michiel Meeuwissen - * @version $Id: ClassAuthentication.java,v 1.24 2008/10/20 14:12:22 michiel Exp $ + * @version $Id: ClassAuthentication.java,v 1.25 2008/11/03 14:00:57 michiel Exp $ * @see ClassAuthenticationWrapper * @since MMBase-1.8 */ @@ -101,7 +101,7 @@ } property = property.getNextSibling(); } - authenticatedClasses.add(new Login(u, Pattern.compile(clazz), method, Collections.unmodifiableMap(map), weight, i)); + authenticatedClasses.add(new Login(u, Pattern.compile(clazz), method, map, weight, i)); } } catch (Exception e) { log.error(u + " " + e.getMessage(), e); @@ -113,7 +113,7 @@ { // last fall back, everybody may get the 'anonymous' cloud. Map<String, String> map = new HashMap<String, String>(); map.put("rank", "anonymous"); - authenticatedClasses.add(new Login(null, Pattern.compile(".*"), "class", Collections.unmodifiableMap(map), Integer.MIN_VALUE, 0)); + authenticatedClasses.add(new Login(null, Pattern.compile(".*"), "class", map, Integer.MIN_VALUE, 0)); } log.service("Class authentication: " + authenticatedClasses); @@ -259,10 +259,20 @@ /** * @since MMBase-1.9 */ + private static Map<String, String> createCombinedMap(Map<String, String> map1, Map<String, String> map2) { + Map<String, String> result = new HashMap<String, String>(); + result.putAll(map1); + result.putAll(map2); + return result; + } + + /** + * @since MMBase-1.9 + */ public static class LoginResult extends Login { final int propertyMatchCount; LoginResult(Login p, Map<String, String> properties, int propertyMatchCount) { - super(p.url, p.classPattern, p.application, properties == null ? p.map : new LinkMap<String, String>(p.map, properties), p.weight, p.position); + super(p.url, p.classPattern, p.application, properties == null ? p.map : createCombinedMap(p.map, properties), p.weight, p.position); this.propertyMatchCount = propertyMatchCount; } public String toString() { _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs