Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #111 from arekkas/master
Browse files Browse the repository at this point in the history
Fixed an issue where identityroles would not get properly converted to string.
  • Loading branch information
bakura10 committed Dec 8, 2013
2 parents 89c02d6 + 8a76bb3 commit 4e27242
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ZfcRbac/Service/AuthorizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,12 @@ protected function flattenRoles(array $roles)
if (in_array($role, $flattenedRoles)) {
continue;
}

$flattenedRoles[] = $role;

if ($role instanceof RoleInterface) {
$flattenedRoles[] = $role->getName();
} else {
$flattenedRoles[] = $role;
}

if ($this->rbac->hasRole($role)) {
$roleFromRbac = $this->rbac->getRole($role);
Expand Down

0 comments on commit 4e27242

Please sign in to comment.