diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f0e06e1e..34300f966 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## mm/dd/2020 1. [](#bugfix) - * Regression: fatal error in blueprints [#2811](https://github.com/getgrav/grav/issues/2811) + * Regression: Fixed fatal error in blueprints [#2811](https://github.com/getgrav/grav/issues/2811) + * Regression: Fixed bad method call in FlexDirectory::getAuthorizeRule() # v1.7.0-rc.5 ## 02/03/2020 diff --git a/composer.json b/composer.json index d15eb23c1..6eb55f350 100644 --- a/composer.json +++ b/composer.json @@ -108,8 +108,8 @@ "api-16": "vendor/bin/phpdoc-md generate system/src > user/pages/14.api/default.16.md", "api-15": "vendor/bin/phpdoc-md generate system/src > user/pages/14.api/default.md", "post-create-project-cmd": "bin/grav install", - "phpstan": "vendor/bin/phpstan analyse -l 3 -c ./tests/phpstan/phpstan.neon system/src --memory-limit=300M", - "phpstan-framework": "vendor/bin/phpstan analyse -l 7 -c ./tests/phpstan/phpstan.neon system/src/Grav/Framework --memory-limit=300M", + "phpstan": "vendor/bin/phpstan analyse -l 3 -c ./tests/phpstan/phpstan.neon system/src --memory-limit=340M", + "phpstan-framework": "vendor/bin/phpstan analyse -l 7 -c ./tests/phpstan/phpstan.neon system/src/Grav/Framework --memory-limit=128M", "phpstan-plugins": "vendor/bin/phpstan analyse -l 0 -c ./tests/phpstan/plugins.neon user/plugins --memory-limit=300M", "test": "vendor/bin/codecept run unit", "test-windows": "vendor\\bin\\codecept run unit" diff --git a/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php b/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php index be7f8a3b4..0e6351b10 100644 --- a/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php +++ b/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php @@ -117,6 +117,10 @@ trait FlexAuthorizeTrait */ protected function getAuthorizeRule(string $scope, string $action): string { + if ($this instanceof FlexDirectory) { + return $this->getAuthorizeRule($scope, $action); + } + return $this->getFlexDirectory()->getAuthorizeRule($scope, $action); } }