diff options
author | Struan Donald <struan@exo.org.uk> | 2018-10-12 14:17:05 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2018-10-18 10:00:21 +0100 |
commit | 5c736b92c25be4beec7799d5f0d07691e44051da (patch) | |
tree | 3ed49386a1a04302aab26edc23e49dc1e8992891 /perllib/FixMyStreet/App/Controller | |
parent | 08e335ce05c81db337f3f7623e1e3fe734546ce9 (diff) |
allow cobrands to restrict /contact to abuse reports
Add abuse_reports_only cobrand method that prevents the contact form
being used unless it's an abuse report.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Contact.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Contact.pm b/perllib/FixMyStreet/App/Controller/Contact.pm index aabeb650e..8850c37b4 100644 --- a/perllib/FixMyStreet/App/Controller/Contact.pm +++ b/perllib/FixMyStreet/App/Controller/Contact.pm @@ -100,6 +100,8 @@ sub determine_contact_type : Private { if ( $c->get_param("reject") && $c->user->has_permission_to(report_reject => $c->stash->{problem}->bodies_str_ids) ) { $c->stash->{rejecting_report} = 1; } + } elsif ( $c->cobrand->abuse_reports_only ) { + $c->detach( '/page_error_404_not_found' ); } return 1; |