activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tmie...@apache.org
Subject [2/3] git commit: https://issues.apache.org/jira/browse/AMQ-5304 - applying groupClass to <tempDestinationAuthorizationEntry>
Date Thu, 07 Aug 2014 12:10:15 GMT
https://issues.apache.org/jira/browse/AMQ-5304 - applying groupClass to <tempDestinationAuthorizationEntry>


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/56484823
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/56484823
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/56484823

Branch: refs/heads/trunk
Commit: 56484823110d39b33d36b594c42b3ba2317889ec
Parents: 98f707b
Author: Torsten Mielke <tmielke@redhat.com>
Authored: Thu Aug 7 11:08:38 2014 +0200
Committer: Torsten Mielke <tmielke@redhat.com>
Committed: Thu Aug 7 11:08:38 2014 +0200

----------------------------------------------------------------------
 .../activemq/security/TempDestinationAuthorizationEntry.java | 6 ------
 .../org/apache/activemq/security/XBeanAuthorizationMap.java  | 8 +++++++-
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/56484823/activemq-broker/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java
b/activemq-broker/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java
index fe19e56..71f46f6 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/security/TempDestinationAuthorizationEntry.java
@@ -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));
         }
     }
-
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/56484823/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java
----------------------------------------------------------------------
diff --git a/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java
b/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java
index 8d43efb..08ca5b3 100644
--- a/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java
+++ b/activemq-spring/src/main/java/org/apache/activemq/security/XBeanAuthorizationMap.java
@@ -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);
     }
 


Mime
View raw message