...
 
Commits (2)
......@@ -3,8 +3,8 @@
"license": "MIT",
"require-dev": {
"php": "~7.1",
"nette/security": "~2.4",
"nette/di": "~2.4",
"nette/security": "~3.0",
"nette/di": "~3.0",
"nette/tester": "~2.0",
"phpstan/phpstan": "^0.8.5",
"zendframework/zend-permissions-acl": "^2.6"
......
......@@ -30,14 +30,14 @@ class AuthorizationExtension extends CompilerExtension
$builder = $this->getContainerBuilder();
$config = $this->validateConfig($this->defaults);
$builder->addDefinition($this->prefix('authorizator'))
->setClass(Authorizator::class)
->setType(Authorizator::class)
->setFactory(DefaultAuthorizator::class);
if ($config['accessEvaluator'] !== NULL) {
$def = $builder->addDefinition('accessEvaluator')
->setClass(AccessEvaluator::class);
Compiler::loadDefinition($def, $config['accessEvaluator']);
$builder->addDefinition('accessEvaluator')
->setType(AccessEvaluator::class)
->setFactory($config['accessEvaluator']);
}
}
......