Commit 199b6ad4 authored by Fabien Potencier's avatar Fabien Potencier

added a new security.voters service to allow for easier extensibility

parent a105baec
......@@ -95,10 +95,14 @@ class SecurityServiceProvider implements ServiceProviderInterface
});
$app['security.access_manager'] = $app->share(function () use ($app) {
return new AccessDecisionManager(array(
return new AccessDecisionManager($app['security.voters']);
});
$app['security.voters'] = $app->share(function () use ($app) {
return array(
new RoleHierarchyVoter(new RoleHierarchy($app['security.role_hierarchy'])),
new AuthenticatedVoter($app['security.trust_resolver']),
));
);
});
$app['security.firewall'] = $app->share(function () use ($app) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment