mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Fixed UserObject::$authorizeCallable binding to the user object
This commit is contained in:
parent
484a41e42a
commit
a4beb9b8bd
|
|
@ -17,6 +17,7 @@
|
|||
* Block `.json` files in web server configs
|
||||
* Disabled pretty debug info for Flex as it slows down Twig rendering
|
||||
* Fixed Twig being very slow when template overrides do not exist
|
||||
* Fixed `UserObject::$authorizeCallable` binding to the user object
|
||||
|
||||
# v1.7.25
|
||||
## 11/16/2021
|
||||
|
|
|
|||
|
|
@ -284,8 +284,8 @@ class UserObject extends FlexObject implements UserInterface, Countable
|
|||
// Check custom application access.
|
||||
$authorizeCallable = static::$authorizeCallable;
|
||||
if ($authorizeCallable instanceof Closure) {
|
||||
$authorizeCallable->bindTo($this);
|
||||
$authorized = $authorizeCallable($action, $scope);
|
||||
$callable = $authorizeCallable->bindTo($this, $this);
|
||||
$authorized = $callable($action, $scope);
|
||||
if (is_bool($authorized)) {
|
||||
return $authorized;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user