parent
3199f21f29
commit
2fb6cd5b50
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace Icinga\Web;
|
namespace Icinga\Web;
|
||||||
|
|
||||||
use Icinga\Authentication\Auth;
|
use Icinga\Authentication\Manager;
|
||||||
use Icinga\Application\Benchmark;
|
use Icinga\Application\Benchmark;
|
||||||
use Icinga\Exception;
|
use Icinga\Exception;
|
||||||
use Icinga\Application\Config;
|
use Icinga\Application\Config;
|
||||||
|
@ -92,12 +92,6 @@ class ActionController extends ZfController
|
||||||
array $invokeArgs = array()
|
array $invokeArgs = array()
|
||||||
) {
|
) {
|
||||||
Benchmark::measure('Action::__construct()');
|
Benchmark::measure('Action::__construct()');
|
||||||
if (Auth::getInstance()->isAuthenticated()
|
|
||||||
&& !$this->modifiesSession
|
|
||||||
&& !Notification::getInstance()->hasMessages()
|
|
||||||
) {
|
|
||||||
session_write_close();
|
|
||||||
}
|
|
||||||
$this->module_name = $request->getModuleName();
|
$this->module_name = $request->getModuleName();
|
||||||
$this->controller_name = $request->getControllerName();
|
$this->controller_name = $request->getControllerName();
|
||||||
$this->action_name = $request->getActionName();
|
$this->action_name = $request->getActionName();
|
||||||
|
@ -108,8 +102,13 @@ class ActionController extends ZfController
|
||||||
->_setInvokeArgs($invokeArgs);
|
->_setInvokeArgs($invokeArgs);
|
||||||
$this->_helper = new ZfActionHelper($this);
|
$this->_helper = new ZfActionHelper($this);
|
||||||
|
|
||||||
if ($this->handlesAuthentication()
|
if ($this->handlesAuthentication() ||
|
||||||
|| Auth::getInstance()->isAuthenticated()
|
Auth::getInstance(
|
||||||
|
null,
|
||||||
|
array(
|
||||||
|
"writeSession" => $this->modifiesSession
|
||||||
|
)
|
||||||
|
)->isAuthenticated()
|
||||||
) {
|
) {
|
||||||
$this->allowAccess = true;
|
$this->allowAccess = true;
|
||||||
$this->init();
|
$this->init();
|
||||||
|
@ -164,7 +163,7 @@ class ActionController extends ZfController
|
||||||
*/
|
*/
|
||||||
final protected function hasPermission($uri, $permission = 'read')
|
final protected function hasPermission($uri, $permission = 'read')
|
||||||
{
|
{
|
||||||
return Auth::getInstance()->hasPermission($uri, $permission);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue