Skip to content

Commit

Permalink
Permission: used native callback invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 2, 2018
1 parent d46a7f9 commit 9b60f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Security/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ private function getRuleType($resource, $role, $privilege)
$rule = $rules['byPrivilege'][$privilege];
}

if ($rule['assert'] === null || Nette\Utils\Callback::invoke($rule['assert'], $this, $role, $resource, $privilege)) {
if ($rule['assert'] === null || call_user_func($rule['assert'], $this, $role, $resource, $privilege)) {
return $rule['type'];

} elseif ($resource !== self::ALL || $role !== self::ALL || $privilege !== self::ALL) {
Expand Down

0 comments on commit 9b60f15

Please sign in to comment.