diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-05-15 09:37:14 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-05-15 09:37:14 +0100 |
commit | 60c6248c2fabb6a2144549e89f6bb238264b7d95 (patch) | |
tree | ddc1b80c90f65d71df583d2a2589736b577f06b8 | |
parent | 20120519e914b9eb89e869d186b807d108f0a46f (diff) |
Allow photo display to admin users, as they might not be approved yet.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Photo.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm index 8b00d1533..cefb2695a 100644 --- a/perllib/FixMyStreet/App/Controller/Photo.pm +++ b/perllib/FixMyStreet/App/Controller/Photo.pm @@ -74,7 +74,10 @@ sub index :LocalRegex('^(c/)?(\d+)(?:\.(full|tn|fp))?\.jpeg$') { $c->detach( 'no_photo' ) unless @photo; my $item = $photo[0]; - $c->detach( 'no_photo' ) unless $c->cobrand->allow_photo_display($item); # Should only be for reports, not updates + # This should only be for reports, not updates + unless ( $c->cobrand->allow_photo_display($item) || ( $c->user_exists && $c->user->from_body ) ) { + $c->detach( 'no_photo' ) + } my $photo = $item->photo; # If photo field contains a hash |