aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/ResultSet/Problem.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2018-10-23 17:01:40 +0100
committerStruan Donald <struan@exo.org.uk>2018-11-12 11:24:09 +0000
commit9e9460b8ff4bdccf9dc0166331688f2f0818b29f (patch)
tree4d07226516cfc61782d12a4f76480fb559509a88 /perllib/FixMyStreet/DB/ResultSet/Problem.pm
parent6c2fa7f8e55283d1595ac7f293de5266f2b8fed7 (diff)
add report_mark_private permission
Allows user's to see the inspector panel to mark reports as Private, and also to view those non-public reports. Useful for call centre staff who want to record private reports but don't need to other permissions. Fixes mysociety/fixmystreet-commercial#1213
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/Problem.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Problem.pm b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
index cc28e4c33..0a180f8e3 100644
--- a/perllib/FixMyStreet/DB/ResultSet/Problem.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/Problem.pm
@@ -30,7 +30,8 @@ sub non_public_if_possible {
if ($c->user_exists) {
if ($c->user->is_superuser) {
# See all reports, no restriction
- } elsif ($c->user->has_body_permission_to('report_inspect')) {
+ } elsif ($c->user->has_body_permission_to('report_inspect') ||
+ $c->user->has_body_permission_to('report_mark_private')) {
$params->{'-or'} = [
non_public => 0,
$rs->body_query($c->user->from_body->id),