aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Reports.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/Script/Reports.pm')
-rw-r--r--perllib/FixMyStreet/Script/Reports.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Script/Reports.pm b/perllib/FixMyStreet/Script/Reports.pm
index 8d3b2ddbc..7d614bc30 100644
--- a/perllib/FixMyStreet/Script/Reports.pm
+++ b/perllib/FixMyStreet/Script/Reports.pm
@@ -145,9 +145,16 @@ sub send(;$) {
my $inspection_required = $sender_info->{contact}->get_extra_metadata('inspection_required') if $sender_info->{contact};
if ( $inspection_required ) {
+ my $reputation_threshold = $sender_info->{contact}->get_extra_metadata('reputation_threshold') || 0;
+ my $reputation_threshold_met = 0;
+ if ( $reputation_threshold > 0 ) {
+ my $user_reputation = $row->user->get_extra_metadata('reputation') || 0;
+ $reputation_threshold_met = $user_reputation >= $reputation_threshold;
+ }
unless (
$row->get_extra_metadata('inspected') ||
- $row->user->has_permission_to( trusted => $row->bodies_str_ids )
+ $row->user->has_permission_to( trusted => $row->bodies_str_ids ) ||
+ $reputation_threshold_met
) {
$skip = 1;
debug_print("skipped because not yet inspected", $row->id) if $debug_mode;