diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-15 07:54:31 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2017-08-09 17:03:48 +0100 |
commit | 4d18b5c100d0df1276f953b90fb3481391989376 (patch) | |
tree | f4fc54af6712c73c1fa3a8b3979fbd74a8438021 | |
parent | 82f4fd831c2dd4517437b1c27c2ec43ac6d14549 (diff) |
Ensure user has from_body for contribute as body.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 3acb385bd..6b02bd80d 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -201,7 +201,7 @@ sub report_form_ajax : Path('ajax') : Args(0) { if ($c->user_exists) { my @bodies = keys %{$c->stash->{bodies}}; my $ca_another_user = $c->user->has_permission_to('contribute_as_another_user', \@bodies); - my $ca_body = $c->user->has_permission_to('contribute_as_body', \@bodies); + my $ca_body = $c->user->from_body && $c->user->has_permission_to('contribute_as_body', \@bodies); $contribute_as->{another_user} = $ca_another_user if $ca_another_user; $contribute_as->{body} = $ca_body if $ca_body; } |