aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-09-14 10:52:08 +0100
committerDave Arter <davea@mysociety.org>2016-09-20 16:07:09 +0100
commitb01df0c7609a1d6c008b943a9936d471cf0e0ce3 (patch)
tree150199d93afb6ad71a6d7cb921eaff81dd07f63b /perllib/FixMyStreet/App/Controller/Report.pm
parent6f623cbb0c055fb4ae7f1a3639edaa212fc55392 (diff)
Remove from_body requirement from User::has_permission_to
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 1d67afd0e..34392782b 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -133,7 +133,7 @@ sub load_problem_or_display_error : Private {
}
$c->stash->{problem} = $problem;
- if ( $c->user_exists && $c->user->has_permission_to(moderate => $problem->bodies_str) ) {
+ if ( $c->user_exists && $c->user->has_permission_to(moderate => $problem->bodies_str_ids) ) {
$c->stash->{problem_original} = $problem->find_or_new_related(
moderation_original_data => {
title => $problem->title,
@@ -401,7 +401,7 @@ to the current Problem in $c->stash->{problem}. Shows the 403 page if not.
sub check_has_permission_to : Private {
my ( $self, $c, @permissions ) = @_;
- my $bodies = $c->stash->{problem}->bodies_str;
+ my $bodies = $c->stash->{problem}->bodies_str_ids;
my %permissions = map { $_ => $c->user->has_permission_to($_, $bodies) } @permissions
if $c->user_exists;