diff options
author | Dave Arter <davea@mysociety.org> | 2016-09-14 10:52:08 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2016-09-20 16:07:09 +0100 |
commit | b01df0c7609a1d6c008b943a9936d471cf0e0ce3 (patch) | |
tree | 150199d93afb6ad71a6d7cb921eaff81dd07f63b /perllib/FixMyStreet/App/Controller/Report/New.pm | |
parent | 6f623cbb0c055fb4ae7f1a3639edaa212fc55392 (diff) |
Remove from_body requirement from User::has_permission_to
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 7b012e0a1..267f1059d 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -188,9 +188,9 @@ sub report_form_ajax : Path('ajax') : Args(0) { my $contribute_as = {}; if ($c->user_exists) { - my $bodies = join(',', 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 @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); $contribute_as->{another_user} = $ca_another_user if $ca_another_user; $contribute_as->{body} = $ca_body if $ca_body; } |