Bugfixes/tasks list

This commit is contained in:
2021-11-05 12:31:41 +00:00
parent e1677cd2b6
commit 35d807cab0
11 changed files with 74 additions and 26 deletions

View File

@@ -33,12 +33,14 @@ class ParentRoleHelper
* Return all the role which give access to the given role. Only the role
* which are registered into Chill are taken into account.
*
* The array contains always the current $role (which give access to himself)
*
* @param string $role
* @return string[] the role which give access to the given $role
*/
public function getParentRoles(string $role): array
{
$parentRoles = [];
$parentRoles = [$role];
// transform the roles from role hierarchy from string to Role
$roles = \array_keys($this->hierarchy);