incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From esjew...@apache.org
Subject svn commit: r943677 - /incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala
Date Wed, 12 May 2010 20:44:54 GMT
Author: esjewett
Date: Wed May 12 20:44:53 2010
New Revision: 943677

URL: http://svn.apache.org/viewvc?rev=943677&view=rev
Log:
[ESME-212] Fixes issue where messages from pools user is not authorized to see are no longer
hidden after Lift 2.0 and Scala 2.8 upgrade

Modified:
    incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala

Modified: incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala?rev=943677&r1=943676&r2=943677&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala (original)
+++ incubator/esme/trunk/server/src/main/scala/org/apache/esme/model/Message.scala Wed May
12 20:44:53 2010
@@ -196,19 +196,19 @@ object Message extends Message with Long
    * to override to redefine some global behavior.
    */
   override def findMapDb[T](dbId : ConnectionIdentifier, by : QueryParam[Message]*)(f : (Message)
=> Box[T]): List[T] = {
-    // modify behavior of find methods so that results include only authorized pools of current
user
+    // modify behavior of find methods so that results include only authorized pools of current
user      
     val viewablePools =
       for (user <- User.currentUser) yield {
         Privilege.findViewablePools(user.id.is)
-      }
+      }                                      
     val newQueryParams: Seq[QueryParam[Message]] = viewablePools match {
-      case Full(pools: Set[Long]) if !pools.isEmpty => List(
+      case Full(pools: List[Long]) if !pools.isEmpty => List(
         BySql(" POOL in ( ?" + ( ", ?" * (pools.size - 1)) + " ) OR POOL IS NULL ",
               IHaveValidatedThisSQL("vdichev", "22 June 2009"),
               pools.toSeq:_*)
       )
       case _ => Nil
-    }
+    }                                           
     val modifiedQueryParams = by ++ newQueryParams
     logger.info("Modified query: " + modifiedQueryParams)
     super.findMapDb(dbId, modifiedQueryParams:_*)(f)



Mime
View raw message