mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
hook Phalcon controllers into current authentication
This commit is contained in:
parent
44de656e35
commit
6dca11144d
@ -51,8 +51,10 @@ class ApiControllerBase extends Controller
|
||||
*/
|
||||
public function beforeExecuteRoute($dispatcher)
|
||||
{
|
||||
|
||||
//$auth = $this->session->get('auth');
|
||||
// use authentication of legacy OPNsense.
|
||||
if ($this->session->has("Logged_In") == false) {
|
||||
$this->response->redirect("/", true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -66,6 +66,10 @@ class ControllerBase extends Controller
|
||||
*/
|
||||
public function beforeExecuteRoute($dispatcher)
|
||||
{
|
||||
// use authentication of legacy OPNsense.
|
||||
if ($this->session->has("Logged_In") == false) {
|
||||
$this->response->redirect("/", true);
|
||||
}
|
||||
// Execute before every found action
|
||||
$this->view->setVar('lang', $this->getTranslator());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user