diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-01-08 11:50:12 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-01-08 11:50:14 +0000 |
commit | e61170f8d7308027a7e3a935f5f306da0af0b4df (patch) | |
tree | 30c4302bd40b0d04a90984504af18d7a5bac1705 /perllib/FixMyStreet/App/Controller/Report.pm | |
parent | ce81c44ea231e180f635beb60218330a326284c6 (diff) |
Allow staff users to sign others up for alerts.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index debf27cde..9cc810c16 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -91,6 +91,10 @@ sub display :PathPart('') :Chained('id') :Args(0) { $c->stash->{template} = 'report/inspect.html'; $c->forward('inspect'); } + + if ($c->user_exists && $c->user->has_permission_to(contribute_as_another_user => $c->stash->{problem}->bodies_str_ids)) { + $c->stash->{email} = $c->user->email; + } } sub moderate_report :PathPart('moderate') :Chained('id') :Args(0) { |