public function getAvailableRoles()
    {
        Piwik::checkUserHasSomeAdminAccess();

        $response = array();

        foreach ($this->roleProvider->getAllRoles() as $role) {
            $response[] = array(
                'id' => $role->getId(),
                'name' => $role->getName(),
                'description' => $role->getDescription(),
                'helpUrl' => $role->getHelpUrl(),
            );
        }

        return $response;
    }
public function getAvailableRoles()
    {
        Piwik::checkUserHasSomeAdminAccess();

        $response = array();

        foreach ($this->roleProvider->getAllRoles() as $role) {
            $response[] = array(
                'id' => $role->getId(),
                'name' => $role->getName(),
                'description' => $role->getDescription(),
                'helpUrl' => $role->getHelpUrl(),
            );
        }

        return $response;
    }
public function getAvailableRoles ( ) { Piwik :: checkUserHasSomeAdminAccess ( ) ; $ response = array ( ) ; foreach ( $ this -> roleProvider -> getAllRoles ( ) as $ role ) { $ response [ ] = array ( 'id' => $ role -> getId ( ) , 'name' => $ role -> getName ( ) , 'description' => $ role -> getDescription ( ) , 'helpUrl' => $ role -> getHelpUrl ( ) , ) ; } return $ response ; }
Get the list of all available roles.
It does not return the super user role, and neither the "noaccess" role.
@return array[]  Returns an array containing information about each role
Get the list of all available roles . It does not return the super user role and neither the noaccess role .