Bounce the user to the login page if they try to get to part of the

admin site as a guest.  Also, theme the login/html page.
This commit is contained in:
Bharat Mediratta
2010-06-12 15:28:03 -07:00
parent dceecabbf1
commit 87f8b6ff0a
2 changed files with 12 additions and 4 deletions

View File

@@ -22,7 +22,12 @@ class Admin_Controller extends Controller {
public function __construct($theme=null) {
if (!identity::active_user()->admin) {
access::forbidden();
if (identity::active_user()->guest) {
Session::instance()->set("continue_url", url::abs_current(true));
url::redirect("login");
} else {
access::forbidden();
}
}
parent::__construct();