diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-15 12:41:03 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-15 16:19:28 +0100 |
commit | 79bbef3a3e21436afbb1d6e70a04eb48c09994f5 (patch) | |
tree | e1faee25196f1c31d4e94dc71b3e61d5928eb0bb /perllib/FixMyStreet/Cobrand/UKCouncils.pm | |
parent | cc8e32bde96955e62d73220240c57fafdd2cad1e (diff) |
If running a dev site, skip some restrictions.
This makes it easier to perform manual testing of cobrands.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/UKCouncils.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 5d72c4962..42c9c5cbc 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -42,11 +42,13 @@ sub restriction { sub problems_restriction { my ($self, $rs) = @_; + return $rs if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); return $rs->to_body($self->council_id); } sub updates_restriction { my ($self, $rs) = @_; + return $rs if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); return $rs->to_body($self->council_id); } @@ -96,6 +98,8 @@ sub enter_postcode_text { sub area_check { my ( $self, $params, $context ) = @_; + return 1 if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); + my $councils = $params->{all_areas}; my $council_match = defined $councils->{$self->council_id}; if ($council_match) { |