aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-04-19 11:09:41 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-04-19 11:09:41 +0100
commit69be0151757f1802052b9895135d3047605e6338 (patch)
treeaaeab66bb26e21bbd582b243233db60f1a855f5d /app/controllers/request_controller.rb
parent17d8dad044dea0fc678d0bdc409700131685db86 (diff)
parenta33c560ab2a3a6c1090dc0334b85c46b9f45c107 (diff)
Merge branch 'develop' into purge-requests
Conflicts: spec/controllers/request_controller_spec.rb
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index b484ec514..7ca081c04 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -347,7 +347,13 @@ class RequestController < ApplicationController
return
end
- @info_request.user = authenticated_user
+ if params[:post_redirect_user]
+ # If an admin has clicked the confirmation link on a users behalf,
+ # we don’t want to reassign the request to the administrator.
+ @info_request.user = params[:post_redirect_user]
+ else
+ @info_request.user = authenticated_user
+ end
# This automatically saves dependent objects, such as @outgoing_message, in the same transaction
@info_request.save!
# XXX send_message needs the database id, so we send after saving, which isn't ideal if the request broke here.