Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure security.role_hierarchy.roles always exists
  • Loading branch information
wouterj authored and fabpot committed Nov 29, 2015
1 parent 6ae61f6 commit b272ab5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Expand Up @@ -47,6 +47,7 @@
<parameter key="security.validator.user_password.class">Symfony\Component\Security\Core\Validator\Constraints\UserPasswordValidator</parameter>

<parameter key="security.expression_language.class">Symfony\Component\Security\Core\Authorization\ExpressionLanguage</parameter>
<parameter key="security.role_hierarchy.roles" type="collection" />
</parameters>

<services>
Expand Down
Expand Up @@ -115,10 +115,7 @@ public function testDisableRoleHierarchyVoter()

$container->compile();

$admDefinition = $container->getDefinition('security.access.decision_manager');
$registeredVoters = array_map('strval', $admDefinition->getArgument(0));

$this->assertNotContains('security.access.role_hierarchy_voter', $registeredVoters);
$this->assertFalse($container->hasDefinition('security.access.role_hierarchy_voter'));
}

protected function getRawContainer()
Expand Down

0 comments on commit b272ab5

Please sign in to comment.