Skip to content

Commit

Permalink
#5540 Implement validation (authorization) for OMP - temporarily remo…
Browse files Browse the repository at this point in the history
…ve restricted site check until all checks are back in as authorization policies (broke grids)
  • Loading branch information
fgrandel committed Jul 7, 2010
1 parent 2af1e51 commit 3eb1b87
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions classes/handler/PKPHandler.inc.php
Expand Up @@ -35,23 +35,6 @@ class PKPHandler {
*/
function PKPHandler() {
$this->_checks = array();

// Enforce restricted site access.
$application =& PKPApplication::getApplication();
$request =& $application->getRequest();
$router =& $request->getRouter();
$context =& $router->getContext($request);
if ( $context && $context->getSetting('restrictSiteAccess')) {
if (is_a($router, 'PKPPageRouter')) {
$page = $router->getRequestedPage($request);
} else {
$page = null;
}
$this->addCheck(new HandlerValidatorCustom($this, true, null, null, create_function('$page', 'if (!Validation::isLoggedIn() && !in_array($page, PKPHandler::getLoginExemptions())) return false; else return true;'), array($page)));
}

// Enforce SSL sitewide.
$this->addCheck(new HandlerValidatorCustom($this, null, null, null, create_function('$forceSSL, $protocol', 'if ($forceSSL && $protocol != \'https\') Request::redirectSSL(); else return true;'), array(Config::getVar('security', 'force_ssl'), Request::getProtocol())));
}

//
Expand Down

0 comments on commit 3eb1b87

Please sign in to comment.