Read the abilities from the ACL for the given role.

@param $role
@return array
429895
private function getAbilities($role)
    {
        $abilities = [];
        foreach (config('auth.acl') as $ability => $roles) {
            if (in_array($role, $roles)) {
                $abilities[] = $ability;
            }
        }

        return $abilities;
    }
525191
public function getAccessibleRoles(array $roles)
    {
        $accessibleRoles = $roles;
        foreach ($roles as $role) {
            /**
             * @var $role Role
             */
            if (isset($this->map[$role->getRole()])) {
                foreach ($this->map[$role->getRole()] as $r) {
                    $accessibleRoles[] = new Role($r);
                }
            }
        }

        return $accessibleRoles;
    }
801179
public function getterRoleConstants(): array
	{
		$result = [];
		$roles = $this->roles->get();
		/* @var $role AclRole */
		foreach ($roles as $role) {
			$result[] = $role->name;
		}
		return $result;
	}
915744
public function all($role)
    {
        if (!is_string($role)) {
            throw new \InvalidArgumentException(sprintf('Expected $role of type string and got %s', gettype($role)));
        }

        if (!in_array(strtolower($role), array('member', 'contributor', 'admin'), true)) {
            throw new \InvalidArgumentException(sprintf('Unknown role %s', $role));
        }

        return $this->getClient()->setApiVersion('2.0')->get('teams', array('role' => $role));
    }
211403
public function getRoles()
    {
        $roles = array();

        if ($this->acl) {
            foreach ($this->acl->getRoles() as $role) {
                //Do not translate, only make first one uppercase
                $roles[$role] = ucfirst($role);
            }
        }
        asort($roles);

        return $roles;
    }
833307
public function a($role)
    {
        $roles = func_get_args();

        return $this->clipboard->checkRole($this->authority, $roles, 'or');
    }
1120871
public function getRelativeRoleName($role)
    {
        $roles = $this->collectRelativeRoles();
        if (isset($roles[$role])) {
            return $roles[$role];
        }
    }
529590
public function hasRole($role) {
        $roles = (array) $this->Session->read('Acl.roles');

        if (is_numeric($role)) {
            return isset($roles[$role]);
        }

        return in_array($role, $roles);
    }
123458
public function hasRole($role)
    {
        $roles = array_column($this->roles->toArray(), 'name');
        return array_search($role, $roles) > -1;
    }
461249
public function ability($roles, $permissions, $options = [])
    {
        if ($user = $this->user()) {
            return $user->ability($roles, $permissions, $options);
        }

        return false;
    }
977680
public function get($role)
    {
        if (is_scalar($role)) {
            $role = new Role($role);
        } elseif (!$role instanceof Role) {
            throw new \InvalidArgumentException('$role is expected to be of type string or Gobline\Acl\Role');
        }

        $roleName = $role->getName();

        if (!$this->has($role)) {
            throw new \InvalidArgumentException('Role "'.$roleName.'" not found');
        }

        return $this->roles[$roleName];
    }
67941
public function authorizeRoles($roles)
    {
        if (is_array($roles)) {
            return $this->hasAnyRole($roles) ||
                abort(401, 'This action is unauthorized.');
        }
        return $this->hasRole($roles) ||
            abort(401, 'This action is unauthorized.');
    }
639547
public function getRole($role) {
		
		if(false === is_string($role)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($role)), E_USER_ERROR);
		}

		foreach($this -> permissions as $type => $resources) {

			if($role === $type) {
				
				$p = new Resources();
				$p -> setResources($resources);

				return $p;
			}
		}

		return null;
	}
1227636
public function getReachableRoles($roles)
  {
    if (!is_array($roles)) $roles = [$roles];
    
    $reachableRoles = [];
    foreach ($roles as $role) 
    {
      $reachableRoles[$role] = $role;
      if (!isset($this->map[$role])) continue;
      
      foreach ($this->map[$role] as $role) 
      {
        $reachableRoles[$role] = $role;
      }
    }
    return $reachableRoles;
  }
1287162
public function getPermission($role)
    {
        if ($role instanceof RoleInterface || $role instanceof \Symfony\Component\Security\Core\Role\Role) {
            $role = $role->getRole();
        }
        if (isset($this->permissions[$role])) {
            return $this->permissions[$role];
        }

        return null;
    }
229756
public function hasRole($role)
    {
        $role = strtoupper($role);

        if ($role == 'ROLE_USER') {
            return true;
        }

        if (in_array($role, $this->roles)) {
            return true;
        }

        return false;
    }
563357
public function getAllIncludedRoles (array $roles)
    {
        $allIncludedRoles = [];
        foreach ($this->normalizeRoleList($roles) as $role)
        {
            $includedRoleCollection = [];
            $this->findIncludedRoles($role, $includedRoleCollection);
            $allIncludedRoles = array_replace($allIncludedRoles, $includedRoleCollection);

            $includedActionCollection = [];
            $this->findIncludedActions($role, $includedActionCollection);
            $allIncludedRoles = array_replace($allIncludedRoles, $includedActionCollection);
        }

        return $allIncludedRoles;
    }