mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-25 22:09:11 -04:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user