At present, the LoginUser and LogoutUser actions are very geared
towards the (now deprecated) ECS method of page generation.

I suggest that we at least adapt these so that they work for
template-based use of Turbine, removing the need for everyone developing
a secure template-based app to write their own versions.

For LoginUser this is as simple as the patch I've shown below. If a
login.template property exists then use that template for login,
otherwise use screen.login screen.

For LogoutUser I actually think the current scheme is wrong anyway. At
the moment it sets the current screen to screen.homepage. However I feel
that it should abide by the decision of the session validator, which may
leave the issue of what screen to show alone (for a partially secure
sitei or a non-secure site which allows login).

So I suggest that a special case code in Turbine.java for dealing with
the action given by action.login be extended to deal also with the
action given by action.logout (new property). That way the logout occurs
before the session validator is run, and then the page selection
behaviour mandated by the session validator for a non-logged-in user
occurs.

This would also require the removal of the line in LogoutUser that sets
the current screen to screen.homepage.

Comments/votes?


Index: LoginUser.java
===================================================================
RCS file: 
/products/cvs/turbine/turbine/src/java/org/apache/turbine/modules/actions/LoginUser.java,v
retrieving revision 1.7
diff -u -r1.7 LoginUser.java
--- LoginUser.java      2001/01/31 09:48:57     1.7
+++ LoginUser.java      2001/02/08 16:21:10
@@ -128,7 +128,11 @@
             data.setMessage(TurbineResources.getString("login.error"));
             // Retrieve an anonymous user.
             data.setUser (TurbineSecurity.getAnonymousUser());
-            data.setScreen(TurbineResources.getString("screen.login"));
+            String loginTemplate = TurbineResources.getString("template.login");
+            if (loginTemplate != null && loginTemplate.length() > 0)
+                data.setScreenTemplate(loginTemplate);
+            else
+                data.setScreen(TurbineResources.getString("screen.login"));
         }
     }
 }

-- 
Sean Legassick
[EMAIL PROTECTED]
      Als Mensch kann mir nichts menschliches Fremd sein  
      
      


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to