Update of
/var/cvs/contributions/CMSContainer/cmsc/security/src/java/com/finalist/cmsc/security
In directory
james.mmbase.org:/tmp/cvs-serv23010/cmsc/security/src/java/com/finalist/cmsc/security
Modified Files:
Tag: b1_4
SecurityUtil.java
Log Message:
Fixed CMSC-973, it will now correctly merge the rights of multiple groups.
See also:
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/security/src/java/com/finalist/cmsc/security
See also: http://www.mmbase.org/jira/browse/CMSC-973
Index: SecurityUtil.java
===================================================================
RCS file:
/var/cvs/contributions/CMSContainer/cmsc/security/src/java/com/finalist/cmsc/security/SecurityUtil.java,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -b -r1.11 -r1.11.2.1
--- SecurityUtil.java 30 Nov 2007 10:58:34 -0000 1.11
+++ SecurityUtil.java 20 Jun 2008 14:37:26 -0000 1.11.2.1
@@ -154,20 +154,11 @@
Node extraGroup = groups.getNode(i);
fillChannelsWithRole(extraGroup, extraRoles,
treeManagers, relationName);
- for (Map.Entry<String, UserRole> entry :
channelsWithRole.entrySet()) {
- String path = entry.getKey();
- UserRole channelRole = entry.getValue();
- UserRole extraRole = getRole(path, extraRoles);
- if (extraRole != null &&
channelRole.getRole().getId() < extraRole.getRole().getId()) {
- channelsWithRole.put(path, extraRole);
- }
- }
-
for (Map.Entry<String, UserRole> entry :
extraRoles.entrySet()) {
String extraPath = entry.getKey();
UserRole extraRole = entry.getValue();
UserRole channelRole = getRole(extraPath,
channelsWithRole);
- if (channelRole != null &&
channelRole.getRole().getId() < extraRole.getRole().getId()) {
+ if (channelRole == null ||
channelRole.getRole().getId() < extraRole.getRole().getId()) {
channelsWithRole.put(extraPath, extraRole);
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs