summaryrefslogtreecommitdiff
path: root/framework/Security
diff options
context:
space:
mode:
authorxue <>2006-02-17 05:19:25 +0000
committerxue <>2006-02-17 05:19:25 +0000
commit7b38480de52c1d042ea542e2d06913a8c9b645fc (patch)
tree67ff025fb171a5325ac8fdc75a281ce8a19a2bd5 /framework/Security
parentae1c1995b2fec431afe7cca23b2697e1bef17baf (diff)
Add TApplicationComponent class and adjusted the relevant classes.
Diffstat (limited to 'framework/Security')
-rw-r--r--framework/Security/TAuthManager.php8
-rw-r--r--framework/Security/TAuthorizationRule.php1
-rw-r--r--framework/Security/TUserManager.php1
3 files changed, 6 insertions, 4 deletions
diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php
index a41da914..819b7b36 100644
--- a/framework/Security/TAuthManager.php
+++ b/framework/Security/TAuthManager.php
@@ -133,7 +133,7 @@ class TAuthManager extends TModule
{
$this->onAuthenticate($param);
- $service=$this->getApplication()->getService();
+ $service=$this->getService();
if(($service instanceof TPageService) && $service->getRequestedPagePath()===$this->getLoginPage())
$this->_skipAuthorization=true;
}
@@ -181,7 +181,7 @@ class TAuthManager extends TModule
*/
public function getReturnUrl()
{
- return $this->getApplication()->getSession()->itemAt(self::RETURN_URL_VAR);
+ return $this->getSession()->itemAt(self::RETURN_URL_VAR);
}
/**
@@ -244,7 +244,7 @@ class TAuthManager extends TModule
{
if(!$user->getIsGuest())
{
- if(($session=$this->getApplication()->getSession())===null)
+ if(($session=$this->getSession())===null)
throw new TConfigurationException('authmanager_session_required');
else
$session->add($this->generateUserSessionKey(),$user->saveToString());
@@ -279,7 +279,7 @@ class TAuthManager extends TModule
*/
public function logout()
{
- if(($session=$this->getApplication()->getSession())===null)
+ if(($session=$this->getSession())===null)
throw new TConfigurationException('authmanager_session_required');
else
{
diff --git a/framework/Security/TAuthorizationRule.php b/framework/Security/TAuthorizationRule.php
index 8248a45a..81955a44 100644
--- a/framework/Security/TAuthorizationRule.php
+++ b/framework/Security/TAuthorizationRule.php
@@ -63,6 +63,7 @@ class TAuthorizationRule extends TComponent
*/
public function __construct($action,$users,$roles,$verb='')
{
+ parent::__construct();
$action=strtolower(trim($action));
if($action==='allow' || $action==='deny')
$this->_action=$action;
diff --git a/framework/Security/TUserManager.php b/framework/Security/TUserManager.php
index c799c446..06b5d321 100644
--- a/framework/Security/TUserManager.php
+++ b/framework/Security/TUserManager.php
@@ -52,6 +52,7 @@ class TUser extends TComponent implements IUser
*/
public function __construct($manager=null)
{
+ parent::__construct();
$this->_manager=$manager;
}