diff options
-rw-r--r-- | app/controllers/user_controller.rb | 9 | ||||
-rw-r--r-- | app/views/user/no_cookies.rhtml | 12 | ||||
-rw-r--r-- | todo.txt | 6 |
3 files changed, 21 insertions, 6 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index af2f572ba..668dec2a0 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user_controller.rb,v 1.47 2008-06-12 13:43:29 francis Exp $ +# $Id: user_controller.rb,v 1.48 2008-06-12 14:10:46 francis Exp $ class UserController < ApplicationController # Show page about a set of users with same url name @@ -30,6 +30,13 @@ class UserController < ApplicationController def signin work_out_post_redirect + if session.instance_variable_get(:@dbman) + if not session.instance_variable_get(:@dbman).instance_variable_get(:@original) + render :action => 'no_cookies' + return + end + end + if not params[:user_signin] # First time page is shown render :action => 'sign' diff --git a/app/views/user/no_cookies.rhtml b/app/views/user/no_cookies.rhtml new file mode 100644 index 000000000..65dd43f6d --- /dev/null +++ b/app/views/user/no_cookies.rhtml @@ -0,0 +1,12 @@ +<% @title = "Cookies not enabled" %> + +<h1>Please enable "cookies" to carry on</h1> + +<p>To carry on, you need to sign in or make an account. Unfortunately, +this can't be done because of a problem with your browser settings.</p> + +<p>Either your browser does not support a thing called "cookies", or you have +disabled them. Please enable cookies, or try a different browser, and try again +(press refresh twice after enabling them).</p> + +<p>If you are still having trouble then <a href="/help/contact">contact us</a>.</p> @@ -139,11 +139,7 @@ Show public body email address on their public page, with a link to say "this is Allow searching of authorities by tag CSV export of lists of emails for admins -Remember me box - This can't possible be the best way, it is too depressing: - http://onrails.org/articles/2006/02/18/auto-login -Then consider removing login links from notifications of new responses -Matthew says - only set session cookie first time, not each request +Consider removing login links from notifications of new responses, now we have rememeber me Screen scrape this and add link to it on the public body page http://www.ico.gov.uk/Home/tools_and_resources/decision_notices.aspx |