diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/FixMyStreet.pm | 7 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/UKCouncils.pm | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm index 401ef8c45..8ef51f328 100644 --- a/perllib/FixMyStreet/Cobrand/FixMyStreet.pm +++ b/perllib/FixMyStreet/Cobrand/FixMyStreet.pm @@ -291,9 +291,12 @@ sub updates_disallowed { my $staff = $c->user_exists && $c->user->from_body && $c->user->from_body->name =~ /$body/; my $superuser = $c->user_exists && $c->user->is_superuser; return 1 unless $staff || $superuser; - } elsif ($type eq 'reporter') { + } + + if ($type =~ /reporter/) { return 1 if !$c->user_exists || $c->user->id != $problem->user->id; - } elsif ($type eq 'open') { + } + if ($type =~ /open/) { return 1 if $problem->is_fixed || $problem->is_closed; } diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm index 81e5dd569..c652e44c2 100644 --- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm +++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm @@ -391,9 +391,12 @@ sub updates_disallowed { my $staff = $c->user_exists && $c->user->from_body && $c->user->from_body->name eq $self->council_name; my $superuser = $c->user_exists && $c->user->is_superuser; return 1 unless $staff || $superuser; - } elsif ($cfg eq 'reporter') { + } + + if ($cfg =~ /reporter/) { return 1 if !$c->user_exists || $c->user->id != $problem->user->id; - } elsif ($cfg eq 'open') { + } + if ($cfg =~ /open/) { return 1 if $problem->is_fixed || $problem->is_closed; } |