From 6c1b05deafd9940da5d473800032558df90b118e Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 16 Nov 2005 22:32:52 +0000 Subject: Key modules are now using registered to application rather than using reserved module names. --- framework/Security/TAuthManager.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'framework/Security') diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php index c12ee245..57288c0f 100644 --- a/framework/Security/TAuthManager.php +++ b/framework/Security/TAuthManager.php @@ -3,10 +3,6 @@ class TAuthManager extends TComponent implements IModule { const RETURN_URL_VAR='ReturnUrl'; - /** - * @var TAuthorizationRuleCollection list of authorization rules - */ - private $_authRules=null; private $_guest='Guest'; private $_initialized=false; private $_application; @@ -137,7 +133,7 @@ class TAuthManager extends TComponent implements IModule { if($this->hasEventHandler('Authenticate')) $this->raiseEvent('Authorize',$this,$this->_application); - if($this->_authRules!==null && !$this->_authRules->isUserAllowed($this->_application->getUser(),$this->_application->getRequest()->getRequestType())) + if(!$this->_application->getAuthorizationRules()->isUserAllowed($this->_application->getUser(),$this->_application->getRequest()->getRequestType())) { $this->_application->getResponse()->setStatusCode(401); $this->_application->completeRequest(); @@ -190,16 +186,6 @@ class TAuthManager extends TComponent implements IModule $session->destroy(); } } - /** - * @return TAuthorizationRuleCollection list of authorization rules that may be applied - */ - - public function getAuthorizationRules() - { - if($this->_authRules===null) - $this->_authRules=new TAuthorizationRuleCollection; - return $this->_authRules; - } } ?> \ No newline at end of file -- cgit v1.2.3