Fixed RoleHierarchy implementation

Signed-off-by: Gergely Polonkai (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely Polonkai (W00d5t0ck) 2012-08-23 16:17:45 +02:00
parent c76fbd0ad9
commit bcb199e0de
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class RoleHierarchy implements RoleHierarchyInterface
$roles = $this->roleRepo->findAll();
foreach ($roles as $mainRole) {
$main = $mainRole->getRole();
$this->map[$main] = array();
$this->map[$main] = array($main);
foreach ($mainRole->getInheritedRoles() as $childRole) {
$this->map[$main][] = $childRole->getRole();
// TODO: This is one-level only. Get as deep as possible.