From 2fb6cd5b5084b9920be89e171f19779194cf93ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jannis=20Mo=C3=9Fhammer?= Date: Mon, 10 Jun 2013 17:09:30 +0200 Subject: [PATCH] Moved refs to Authentication/Auth to Authentication/Manager refs #4265 --- library/Icinga/Web/ActionController.php | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/library/Icinga/Web/ActionController.php b/library/Icinga/Web/ActionController.php index 884bbdfab..1f106cbbe 100755 --- a/library/Icinga/Web/ActionController.php +++ b/library/Icinga/Web/ActionController.php @@ -4,7 +4,7 @@ namespace Icinga\Web; -use Icinga\Authentication\Auth; +use Icinga\Authentication\Manager; use Icinga\Application\Benchmark; use Icinga\Exception; use Icinga\Application\Config; @@ -92,12 +92,6 @@ class ActionController extends ZfController array $invokeArgs = array() ) { Benchmark::measure('Action::__construct()'); - if (Auth::getInstance()->isAuthenticated() - && !$this->modifiesSession - && !Notification::getInstance()->hasMessages() - ) { - session_write_close(); - } $this->module_name = $request->getModuleName(); $this->controller_name = $request->getControllerName(); $this->action_name = $request->getActionName(); @@ -108,8 +102,13 @@ class ActionController extends ZfController ->_setInvokeArgs($invokeArgs); $this->_helper = new ZfActionHelper($this); - if ($this->handlesAuthentication() - || Auth::getInstance()->isAuthenticated() + if ($this->handlesAuthentication() || + Auth::getInstance( + null, + array( + "writeSession" => $this->modifiesSession + ) + )->isAuthenticated() ) { $this->allowAccess = true; $this->init(); @@ -164,7 +163,7 @@ class ActionController extends ZfController */ final protected function hasPermission($uri, $permission = 'read') { - return Auth::getInstance()->hasPermission($uri, $permission); + return true; } /**