-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
site_close issue #1070
Comments
thanks for the changes, there is a little typo still in var/config/application.admin.php and change comment to make it work properly by default (only admin access when site is closed) |
thanks for the uncomment, don't forget to change the comment, so i can close this issue |
@taiwen can you change the comment line // Whether to check to have the proper default value indication (only admin access when site is closed) |
What |
ok, i learned something new again today about Pi ;-) |
in var/config/engine.php
setting to 1 the site_close value closes completely the access the site, even the admin site
in lib/Pi/Application/Boostrap/Resource/Permission.php line 58
the Permission class has in the checkAction method with this test
// Deny all access to front for close/maintenance
if (Pi::config('site_close')) {
$this->denyAccess($e);
return;
}
that makes use of the denyAccess method
protected function denyAccess(MvcEvent $e)
{
$statusCode = Pi::service('user')->getUser()->isGuest()
? 401 : 403;
$e->getResponse()->setStatusCode($statusCode);
$e->setError(true);
}
=> should not block the access to admin.
=> would be nice to implement a dedicated template also
The text was updated successfully, but these errors were encountered: