aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index d39b78f36..88fb9be6c 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -276,6 +276,15 @@ class RequestController < ApplicationController
return
end
+ if !authenticated?(
+ :web => _("To send your FOI request"),
+ :email => _("Then your FOI request to {{public_body_name}} will be sent.",:public_body_name=>@info_request.public_body.name),
+ :email_subject => _("Confirm your FOI request to ") + @info_request.public_body.name
+ )
+ # do nothing - as "authenticated?" has done the redirect to signin page for us
+ return
+ end
+
# Show preview page, if it is a preview
if params[:preview].to_i == 1
message = ""
@@ -298,15 +307,6 @@ class RequestController < ApplicationController
return
end
- if !authenticated?(
- :web => _("To send your FOI request"),
- :email => _("Then your FOI request to {{public_body_name}} will be sent.",:public_body_name=>@info_request.public_body.name),
- :email_subject => _("Confirm your FOI request to ") + @info_request.public_body.name
- )
- # do nothing - as "authenticated?" has done the redirect to signin page for us
- return
- end
-
@info_request.user = authenticated_user
# This automatically saves dependent objects, such as @outgoing_message, in the same transaction
@info_request.save!