Merge remote-tracking branch 'upstream/master' into password_expiration

This commit is contained in:
Lorenzo Milesi
2018-01-30 22:16:03 +01:00
81 changed files with 917 additions and 538 deletions

View File

@ -43,9 +43,10 @@ class AccessRuleFilter extends AccessRule
return true;
}
} else {
if (!isset($roleParams)) {
$roleParams = $this->roleParams instanceof Closure ? call_user_func($this->roleParams, $this) : $this->roleParams;
}
$roleParams = $this->roleParams instanceof Closure
? call_user_func($this->roleParams, $this)
: $this->roleParams;
if ($user->can($role, $roleParams)) {
return true;
}