diff options
author | Struan Donald <struan@exo.org.uk> | 2019-11-25 16:52:08 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-11-26 14:22:17 +0000 |
commit | b36f62bdaf4ca3775c2d6efc4974f98dbd105850 (patch) | |
tree | 36f8eb1545321506b408397244bc471b1fb038f4 /perllib/FixMyStreet/App/Controller/Report | |
parent | bb09cc085962d632d4155c648b2cead7d7b1d717 (diff) |
add bodies_id to stash for around and report/new
This resolved the problem of checking user body permissions on both
around and report/new by adding a variable to stash specifically for
this purpose. Previously staff users could not see the mark private tick
if the report form was loaded via javascript from the around page as
there was no bodies variable in the stash.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index b748a34e0..270ad2ddb 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -749,6 +749,7 @@ sub setup_categories_and_bodies : Private { $c->stash->{bodies} = \%bodies; $c->stash->{contacts} = \@contacts; $c->stash->{bodies_to_list} = \%bodies_to_list; + $c->stash->{bodies_ids} = [ map { $_->id } @bodies]; $c->stash->{category_options} = \@category_options; $c->stash->{category_extras} = \%category_extras; $c->stash->{category_extras_hidden} = \%category_extras_hidden; |