tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drobia...@apache.org
Subject svn commit: r1186036 - /tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/example/app0/services/AppModule.java
Date Wed, 19 Oct 2011 08:55:37 GMT
Author: drobiazko
Date: Wed Oct 19 08:55:37 2011
New Revision: 1186036

URL: http://svn.apache.org/viewvc?rev=1186036&view=rev
Log:
WhitelistAnalyzer fix for tapestry-hibernate.

Modified:
    tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/example/app0/services/AppModule.java

Modified: tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/example/app0/services/AppModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/example/app0/services/AppModule.java?rev=1186036&r1=1186035&r2=1186036&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/example/app0/services/AppModule.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-hibernate/src/test/java/org/example/app0/services/AppModule.java
Wed Oct 19 08:55:37 2011
@@ -20,10 +20,15 @@ import org.apache.tapestry5.hibernate.Hi
 import org.apache.tapestry5.hibernate.HibernateSymbols;
 import org.apache.tapestry5.hibernate.HibernateTransactionDecorator;
 import org.apache.tapestry5.ioc.MappedConfiguration;
+import org.apache.tapestry5.ioc.OrderedConfiguration;
 import org.apache.tapestry5.ioc.ServiceBinder;
 import org.apache.tapestry5.ioc.ServiceResources;
+import org.apache.tapestry5.ioc.annotations.Contribute;
 import org.apache.tapestry5.ioc.annotations.Match;
 import org.apache.tapestry5.ioc.annotations.SubModule;
+import org.apache.tapestry5.services.Request;
+import org.apache.tapestry5.services.security.ClientWhitelist;
+import org.apache.tapestry5.services.security.WhitelistAnalyzer;
 
 // @SubModule just needed for developers running these tests within the IDE
 @SubModule({HibernateModule.class, HibernateCoreModule.class})
@@ -46,4 +51,19 @@ public class AppModule
     {
         return decorator.build(serviceInterface, delegate, resources.getServiceId());
     }
+
+
+
+    @Contribute(ClientWhitelist.class)
+    public static void provideWhitelistAnalyzer(OrderedConfiguration<WhitelistAnalyzer>
configuration)
+    {
+       configuration.add("TestAnalyzer", new WhitelistAnalyzer()
+       {
+
+           public boolean isRequestOnWhitelist(Request request)
+           {
+               return true;
+           }
+       }, "before:*");
+    }
 }



Mime
View raw message