Moved refs to Authentication/Auth to Authentication/Manager

refs #4265
This commit is contained in:
Jannis Moßhammer 2013-06-10 17:09:30 +02:00 committed by Marius Hein
parent 3199f21f29
commit 2fb6cd5b50
1 changed files with 9 additions and 10 deletions

View File

@ -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;
} }
/** /**