diff options
author | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2017-05-28 21:31:42 +0200 |
commit | 987124b09a32248414faf4d0d6615d43b29ac6f6 (patch) | |
tree | a549db8af723c981d3b346e855f25d6fd5ff8aa7 /perllib/FixMyStreet/Cobrand/UKCouncils.pm | |
parent | dbf56159e44c1560a413022451bf1a1c4cb22a52 (diff) | |
parent | a085b63ce09f87e83b75cda9b9cd08aadfe75d61 (diff) |
Merge tag 'v2.0.4' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/UKCouncils.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index c22224307..e0b6b5298 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -42,13 +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 if FixMyStreet->staging_flag('skip_checks'); 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 if FixMyStreet->staging_flag('skip_checks'); return $rs->to_body($self->council_id); } @@ -76,7 +76,7 @@ sub users_restriction { my $or_query = [ from_body => $self->council_id, - id => [ { -in => $problem_user_ids }, { -in => $update_user_ids } ], + 'me.id' => [ { -in => $problem_user_ids }, { -in => $update_user_ids } ], ]; if ($self->can('admin_user_domain')) { my $domain = $self->admin_user_domain; @@ -105,7 +105,7 @@ sub enter_postcode_text { sub area_check { my ( $self, $params, $context ) = @_; - return 1 if FixMyStreet->config('STAGING_SITE') && FixMyStreet->config('SKIP_CHECKS_ON_STAGING'); + return 1 if FixMyStreet->staging_flag('skip_checks'); my $councils = $params->{all_areas}; my $council_match = defined $councils->{$self->council_id}; @@ -200,6 +200,7 @@ sub available_permissions { my $perms = $self->next::method(); $perms->{Problems}->{contribute_as_body} = "Create reports/updates as " . $self->council_name; + $perms->{Problems}->{view_body_contribute_details} = "See user detail for reports created as " . $self->council_name; $perms->{Users}->{user_assign_areas} = "Assign users to areas in " . $self->council_name; return $perms; |