[gatewiki-commits] SF.net SVN: gatewiki:[1752] trunk/cow/grails-app/conf/SecurityFilters. groovy

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

[gatewiki-commits] SF.net SVN: gatewiki:[1752] trunk/cow/grails-app/conf/SecurityFilters. groovy

by ian_roberts :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Revision: 1752
          http://gatewiki.svn.sourceforge.net/gatewiki/?rev=1752&view=rev
Author:   ian_roberts
Date:     2009-10-27 11:37:41 +0000 (Tue, 27 Oct 2009)

Log Message:
-----------
Disable the localhost-only restriction for workstation mode when running with
environment=test.  This is to allow you to run a server on one machine and run
the selenium tests for it from another (e.g. to run IE in a Windows VM).

Modified Paths:
--------------
    trunk/cow/grails-app/conf/SecurityFilters.groovy

Modified: trunk/cow/grails-app/conf/SecurityFilters.groovy
===================================================================
--- trunk/cow/grails-app/conf/SecurityFilters.groovy 2009-10-27 11:35:49 UTC (rev 1751)
+++ trunk/cow/grails-app/conf/SecurityFilters.groovy 2009-10-27 11:37:41 UTC (rev 1752)
@@ -12,6 +12,8 @@
 import gate.cow.CowPermission
 import gate.cow.CowUtils
 
+import grails.util.Environment;
+
 /**
  * The beforeInterceptor security filter, as implemented by the Grails
  * JSecurity plugin.
@@ -54,7 +56,10 @@
           }
         } // before
       }
-    } else { // workstation mode
+    } else if(Environment.current != Environment.TEST) {
+      // workstation mode, and not test env (we allow remote connections in
+      // test env so we can test a CoW on one machine using browsers running in
+      // VMs)
       nonLocalRequests(controller: '*', action: '*') {
         before = {
           String userip = request.getRemoteAddr();


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

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
gatewiki-commits mailing list
gatewiki-commits@...
https://lists.sourceforge.net/lists/listinfo/gatewiki-commits