https://issues.apache.org/jira/browse/AMQ-5304 - applying groupClass to <tempDestinationAuthorizationEntry>

This commit is contained in:
Torsten Mielke 2014-08-07 11:08:38 +02:00
parent 98f707bd1e
commit 5648482311
2 changed files with 7 additions and 7 deletions

View File

@ -27,11 +27,6 @@ package org.apache.activemq.security;
public class TempDestinationAuthorizationEntry extends AuthorizationEntry {
public void afterPropertiesSet() throws Exception {
// we don't need to check if destination is specified since
// the TempDestinationAuthorizationEntry should map to all temp
// destinations
if (adminRoles != null) {
setAdminACLs(parseACLs(adminRoles));
}
@ -44,5 +39,4 @@ public class TempDestinationAuthorizationEntry extends AuthorizationEntry {
setReadACLs(parseACLs(readRoles));
}
}
}

View File

@ -59,9 +59,15 @@ public class XBeanAuthorizationMap extends DefaultAuthorizationMap implements In
}
// also check group class of temp destination ACL
if (getTempDestinationAuthorizationEntry() != null && getTempDestinationAuthorizationEntry().getGroupClass() != null) {
// use the group class of the <authorizationMap> entry if this temp
// destination entry has no group class specified.
if (getTempDestinationAuthorizationEntry() != null) {
if (getTempDestinationAuthorizationEntry().getGroupClass() == null) {
getTempDestinationAuthorizationEntry().setGroupClass(groupClass);
}
getTempDestinationAuthorizationEntry().afterPropertiesSet();
}
super.setEntries(authorizationEntries);
}