activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1073563 - in /activemq/activemq-apollo/trunk: apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AddUserHeaderDTO.java apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Date Wed, 23 Feb 2011 00:46:50 GMT
Author: chirino
Date: Wed Feb 23 00:46:50 2011
New Revision: 1073563

URL: http://svn.apache.org/viewvc?rev=1073563&view=rev
Log:
Simplifying configuration of the add_user_header element.

Modified:
    activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AddUserHeaderDTO.java
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala

Modified: activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AddUserHeaderDTO.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AddUserHeaderDTO.java?rev=1073563&r1=1073562&r2=1073563&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AddUserHeaderDTO.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-dto/src/main/java/org/apache/activemq/apollo/dto/AddUserHeaderDTO.java
Wed Feb 23 00:46:50 2011
@@ -33,8 +33,8 @@ public class AddUserHeaderDTO {
     @XmlValue
     public String name;
 
-    @XmlAttribute(name="pick")
-    public String pick;
+    @XmlAttribute(name="separator")
+    public String separator;
 
     @XmlAttribute(name="kind")
     public String kind;

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala?rev=1073563&r1=1073562&r2=1073563&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Wed Feb 23 00:46:50 2011
@@ -730,10 +730,11 @@ class StompProtocolHandler extends Proto
         config.add_user_headers.foreach { h =>
           val matches = security_context.principles(h.kind)
           if( !matches.isEmpty ) {
-            if( Option(h.pick).getOrElse("first") == "first" ) {
-              rc ::= (encode_header(h.name), encode_header(matches.head.allow))
-            } else {
-              rc ::= (encode_header(h.name), encode_header(matches.map(_.allow).mkString("|")))
+            h.separator match {
+              case null=>
+                rc ::= (encode_header(h.name), encode_header(matches.head.allow))
+              case separator =>
+                rc ::= (encode_header(h.name), encode_header(matches.map(_.allow).mkString(separator)))
             }
           }
         }



Mime
View raw message