function validate() { parent::validate(); $schedConf =& Request::getSchedConf(); if (!SchedConfAction::mayViewSchedConf($schedConf)) { Request::redirect(null, 'index'); } return true; }
/** * Checks if a user has access to view papers * @param $schedConf object * @param $conference object * @return bool */ function mayViewPapers(&$schedConf, &$conference) { if (Validation::isSiteAdmin() || Validation::isConferenceManager() || Validation::isDirector() || Validation::isTrackDirector()) { return true; } if (!SchedConfAction::mayViewSchedConf($schedConf)) { return false; } // Allow open access once the "open access" date has passed. $paperAccess = $conference->getSetting('paperAccess'); if ($paperAccess == PAPER_ACCESS_OPEN) { return true; } if ($schedConf->getSetting('delayOpenAccess') && time() > $schedConf->getSetting('delayOpenAccessDate')) { if (Validation::isReader() && $paperAccess == PAPER_ACCESS_ACCOUNT_REQUIRED) { return true; } } if ($schedConf->getSetting('postPapers') && time() > $schedConf->getSetting('postPapersDate')) { if (SchedConfAction::registeredUser($schedConf)) { return true; } if (SchedConfAction::registeredDomain($schedConf)) { return true; } } return false; }