public function checkUserHasSomeViewAccess()
    {
        if ($this->hasSuperUserAccess()) {
            return;
        }

        $idSitesAccessible = $this->getSitesIdWithAtLeastViewAccess();

        if (count($idSitesAccessible) == 0) {
            throw new NoAccessException(Piwik::translate('General_ExceptionPrivilegeAtLeastOneWebsite', array('view')));
        }
    }
public function checkUserHasSomeViewAccess()
    {
        if ($this->hasSuperUserAccess()) {
            return;
        }

        $idSitesAccessible = $this->getSitesIdWithAtLeastViewAccess();

        if (count($idSitesAccessible) == 0) {
            throw new NoAccessException(Piwik::translate('General_ExceptionPrivilegeAtLeastOneWebsite', array('view')));
        }
    }
public function checkUserHasSomeViewAccess ( ) { if ( $ this -> hasSuperUserAccess ( ) ) { return ; } $ idSitesAccessible = $ this -> getSitesIdWithAtLeastViewAccess ( ) ; if ( count ( $ idSitesAccessible ) == 0 ) { throw new NoAccessException ( Piwik :: translate ( 'General_ExceptionPrivilegeAtLeastOneWebsite' , array ( 'view' ) ) ) ; } }
If the user doesn't have any view permission, throw exception

@throws \Piwik\NoAccessException
If the user doesn t have any view permission throw exception