aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2009-09-18 02:50:47 +0000
committerfrancis <francis>2009-09-18 02:50:47 +0000
commitfd05ccfc697caad32c180469f715a4f83d5fd6c5 (patch)
tree25f8213a5278a5e10869331623b58f28cf293617 /app/controllers/request_controller.rb
parent0d3bf274a5e21abe456e47608f851b2fbd76c9d4 (diff)
Fix slightly obtuse error with someone uploading web response when there is no email for authority.
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 6e3137dfd..34430f61a 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_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: request_controller.rb,v 1.183 2009-09-15 18:26:23 francis Exp $
+# $Id: request_controller.rb,v 1.184 2009-09-18 02:50:47 francis Exp $
class RequestController < ApplicationController
@@ -610,7 +610,12 @@ class RequestController < ApplicationController
end
if !@info_request.public_body.is_foi_officer?(@user)
- @reason_params[:user_name] = "an email @" + @info_request.public_body.foi_officer_domain_required
+ domain_required = @info_request.public_body.foi_officer_domain_required
+ if domain_required.nil?
+ render :template => 'user/wrong_user_unknown_email'
+ return
+ end
+ @reason_params[:user_name] = "an email @" + domain_required
render :template => 'user/wrong_user'
return
end