aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Admin.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-05-02 20:23:27 +0100
committerMatthew Somerville <matthew@mysociety.org>2013-05-02 20:48:05 +0100
commitba28a5fcd63144ec85f7a9ba440abc3306299039 (patch)
treef8fd158ef9ab30fd7e6bddeccb4387772e47bb8e /perllib/FixMyStreet/App/Controller/Admin.pm
parent9b6a6fd63daacf67cddb4f5ab7bbcd0375082696 (diff)
Add MAPIT_ID_WHITELIST configuration option.
This allows someone to restrict FixMyStreet's usage to specific MapIt IDs rather than a whole MapIt type. This is currently most useful with Global MapIt as you probably don't want e.g. all the O04s in the world for your installation.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index f69e9ea23..84a406a97 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -278,8 +278,10 @@ sub body_form_dropdowns : Private {
my ( $self, $c ) = @_;
my $areas;
- if ($c->cobrand->moniker eq 'zurich') {
- $areas = mySociety::MaPit::call('areas', 274456);
+ my $whitelist = $c->config->{MAPIT_ID_WHITELIST};
+
+ if ( $whitelist && ref $whitelist eq 'ARRAY' && @$whitelist ) {
+ $areas = mySociety::MaPit::call('areas', $whitelist);
} else {
$areas = mySociety::MaPit::call('areas', $c->cobrand->area_types);
}