[gatewiki-commits] SF.net SVN: gatewiki:[1811] trunk/sventon

View: New views
1 Messages — Rating Filter:   Alert me  

[gatewiki-commits] SF.net SVN: gatewiki:[1811] trunk/sventon

by ian_roberts :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Revision: 1811
          http://gatewiki.svn.sourceforge.net/gatewiki/?rev=1811&view=rev
Author:   ian_roberts
Date:     2009-11-13 12:46:58 +0000 (Fri, 13 Nov 2009)

Log Message:
-----------
Fixed help tooltips in sventon by not restricting access to the "static
content" controller.

Modified Paths:
--------------
    trunk/sventon/extras/src/CowSecurityInterceptor.java
    trunk/sventon/sventon-2.0.4/WEB-INF/sventon-servlet-extras.xml

Modified: trunk/sventon/extras/src/CowSecurityInterceptor.java
===================================================================
--- trunk/sventon/extras/src/CowSecurityInterceptor.java 2009-11-13 12:28:00 UTC (rev 1810)
+++ trunk/sventon/extras/src/CowSecurityInterceptor.java 2009-11-13 12:46:58 UTC (rev 1811)
@@ -11,6 +11,7 @@
 import java.io.ObjectInputStream;
 import java.util.Map;
 import java.util.Set;
+import java.util.List;
 
 public class CowSecurityInterceptor extends HandlerInterceptorAdapter
           implements ServletContextAware {
@@ -24,6 +25,8 @@
   private ServletContext ctx;
   private File sessionDir;
 
+  private List<Object> unrestrictedHandlers;
+
   public void setServletContext(ServletContext ctx) {
     this.ctx = ctx;
   }
@@ -32,8 +35,17 @@
     this.sessionDir = sessionDir;
   }
 
+  public void setUnrestrictedHandlers(List<Object> unrestrictedHandlers) {
+    this.unrestrictedHandlers = unrestrictedHandlers;
+  }
+
   public boolean preHandle(HttpServletRequest request,
       HttpServletResponse response, Object handler) throws Exception {
+    // check if the handler for this request should be unrestricted
+    if(unrestrictedHandlers != null &&
+        unrestrictedHandlers.contains(handler)) {
+      return true;
+    }
     HttpSession httpSession = request.getSession();
     String cowSessionID = request.getParameter(COW_SESSION_PARAM);
     // if no explicit session ID in the request, see if there is one in the

Modified: trunk/sventon/sventon-2.0.4/WEB-INF/sventon-servlet-extras.xml
===================================================================
--- trunk/sventon/sventon-2.0.4/WEB-INF/sventon-servlet-extras.xml 2009-11-13 12:28:00 UTC (rev 1810)
+++ trunk/sventon/sventon-2.0.4/WEB-INF/sventon-servlet-extras.xml 2009-11-13 12:46:58 UTC (rev 1811)
@@ -22,5 +22,10 @@
 
   <bean id="cowSecurityInterceptor" class="CowSecurityInterceptor">
     <property name="sessionDir" ref="cowSessionsDir" />
+    <property name="unrestrictedHandlers">
+      <list>
+        <ref bean="getStaticContentController" />
+      </list>
+    </property>
   </bean>
 </beans>


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gatewiki-commits mailing list
gatewiki-commits@...
https://lists.sourceforge.net/lists/listinfo/gatewiki-commits