public function getRoleForSite($idSite)
    {
        if ($this->hasSuperUserAccess
            || in_array($idSite, $this->getSitesIdWithAdminAccess())
        ) {
            return 'admin';
        }

        if (in_array($idSite, $this->getSitesIdWithWriteAccess())) {
            return 'write';
        }

        if (in_array($idSite, $this->getSitesIdWithViewAccess())) {
            return 'view';
        }

        return 'noaccess';
    }
public function getRoleForSite($idSite)
    {
        if ($this->hasSuperUserAccess
            || in_array($idSite, $this->getSitesIdWithAdminAccess())
        ) {
            return 'admin';
        }

        if (in_array($idSite, $this->getSitesIdWithWriteAccess())) {
            return 'write';
        }

        if (in_array($idSite, $this->getSitesIdWithViewAccess())) {
            return 'view';
        }

        return 'noaccess';
    }
public function getRoleForSite ( $ idSite ) { if ( $ this -> hasSuperUserAccess || in_array ( $ idSite , $ this -> getSitesIdWithAdminAccess ( ) ) ) { return 'admin' ; } if ( in_array ( $ idSite , $ this -> getSitesIdWithWriteAccess ( ) ) ) { return 'write' ; } if ( in_array ( $ idSite , $ this -> getSitesIdWithViewAccess ( ) ) ) { return 'view' ; } return 'noaccess' ; }
Returns the level of access the current user has to the given site.

@param int $idSite The site to check.
@return string The access level, eg, 'view', 'admin', 'noaccess'.
Returns the level of access the current user has to the given site .