diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-09-06 22:38:14 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-09-06 22:38:24 +0100 |
commit | 4bd649c5179eeb56f519e52e572489844d8221d2 (patch) | |
tree | ea3da78088b0181c654cfa682161deab88af4fe0 | |
parent | abcb1f866e33c8eb7d979ae1213016d354f8301e (diff) |
Fix reference issue in can_moderate.
Arguments in TT functions are passed as a hashref.
-rw-r--r-- | perllib/FixMyStreet/DB/Result/User.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm index 5afd9d89c..05e0b620a 100644 --- a/perllib/FixMyStreet/DB/Result/User.pm +++ b/perllib/FixMyStreet/DB/Result/User.pm @@ -331,7 +331,7 @@ sub split_name { } sub can_moderate { - my ($self, $object, %perms) = @_; + my ($self, $object, $perms) = @_; my ($type, $ids); if ($object->isa("FixMyStreet::DB::Result::Comment")) { @@ -342,7 +342,7 @@ sub can_moderate { $ids = $object->bodies_str_ids; } - my $staff_perm = exists($perms{staff}) ? $perms{staff} : $self->has_permission_to(moderate => $ids); + my $staff_perm = exists($perms->{staff}) ? $perms->{staff} : $self->has_permission_to(moderate => $ids); return 1 if $staff_perm; # See if the cobrand wants to allow it in some circumstance |