8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b228378 commit c3b68b0Copy full SHA for c3b68b0
src/Symfony/Component/Security/Core/Role/RoleHierarchy.php
@@ -65,9 +65,17 @@ protected function buildRoleMap()
65
}
66
67
$visited[] = $role;
68
- $this->map[$main] = array_unique(array_merge($this->map[$main], $this->hierarchy[$role]));
69
- $additionalRoles = array_merge($additionalRoles, array_diff($this->hierarchy[$role], $visited));
+
+ foreach ($this->hierarchy[$role] as $roleToAdd) {
70
+ $this->map[$main][] = $roleToAdd;
71
+ }
72
73
+ foreach (array_diff($this->hierarchy[$role], $visited) as $additionalRole) {
74
+ $additionalRoles[] = $additionalRole;
75
76
77
78
+ $this->map[$main] = array_unique($this->map[$main]);
79
80
81
0 commit comments