summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--framework/Security/TAuthManager.php30
-rw-r--r--framework/Web/Services/TPageService.php8
-rw-r--r--index.html7
4 files changed, 42 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index 0376a0bb..efed712b 100644
--- a/HISTORY
+++ b/HISTORY
@@ -22,6 +22,8 @@ ENH: Ticket#634 - Override __toString for TXmlElement and TXmlDocument (Knut)
ENH: Ticket#639 - Added setters for certain properties of TTheme (Qiang)
ENH: Ticket#641 - Added support to find out controls of specified class or parent classes (Qiang)
ENH: Ticket#646 - Implement TAPCCache::add() (Knut)
+ENH: Added TAuthManager.ReturnUrlVarName property (Qiang)
+ENH: Added TPageService.DefaultPageUrl property (Qiang)
NEW: TActiveHiddenField (Carl)
Version 3.1.0 RC May 14, 2007
diff --git a/framework/Security/TAuthManager.php b/framework/Security/TAuthManager.php
index ef9f47f9..cbad51dc 100644
--- a/framework/Security/TAuthManager.php
+++ b/framework/Security/TAuthManager.php
@@ -47,15 +47,19 @@ class TAuthManager extends TModule
/**
* @var IUserManager user manager instance
*/
- private $_userManager=null;
+ private $_userManager;
/**
* @var string login page
*/
- private $_loginPage=null;
+ private $_loginPage;
/**
* @var boolean whether authorization should be skipped
*/
private $_skipAuthorization=false;
+ /**
+ * @var string the session var name for storing return URL
+ */
+ private $_returnUrlVarName;
/**
* Initializes this module.
@@ -67,6 +71,8 @@ class TAuthManager extends TModule
{
if($this->_userManager===null)
throw new TConfigurationException('authmanager_usermanager_required');
+ if($this->_returnUrlVarName===null)
+ $this->_returnUrlVarName=$this->getApplication()->getID().':'.self::RETURN_URL_VAR;
$application=$this->getApplication();
if(is_string($this->_userManager))
{
@@ -177,11 +183,27 @@ class TAuthManager extends TModule
}
/**
+ * @return string the name of the session variable storing return URL. It defaults to 'AppID:ReturnUrl'
+ */
+ public function getReturnUrlVarName()
+ {
+ return $this->_returnUrlVarName;
+ }
+
+ /**
+ * @param string the name of the session variable storing return URL.
+ */
+ public function setReturnUrlVarName($value)
+ {
+ $this->_returnUrlVarName=$value;
+ }
+
+ /**
* @return string URL that the browser should be redirected to when login succeeds.
*/
public function getReturnUrl()
{
- return $this->getSession()->itemAt(self::RETURN_URL_VAR);
+ return $this->getSession()->itemAt($this->getReturnUrlVarName());
}
/**
@@ -190,7 +212,7 @@ class TAuthManager extends TModule
*/
public function setReturnUrl($value)
{
- $this->getSession()->add(self::RETURN_URL_VAR,$value);
+ $this->getSession()->add($this->getReturnUrlVarName(),$value);
}
/**
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 343508b8..ab672558 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -353,6 +353,14 @@ class TPageService extends TService
}
/**
+ * @return string the URL for the default page
+ */
+ public function getDefaultPageUrl()
+ {
+ return $this->constructUrl($this->getDefaultPage());
+ }
+
+ /**
* @return string the root directory for storing pages. Defaults to the 'pages' directory under the application base path.
*/
public function getBasePath()
diff --git a/index.html b/index.html
index 944d9a61..03120b28 100644
--- a/index.html
+++ b/index.html
@@ -90,6 +90,11 @@ PRADO component tags when you use it to edit PRADO templates.
<li><a href="mailto:knut.urdalen@gmail.com">Knut Urdalen</a></li>
</ul>
+<h3>Prado v3 Testing Team</h3>
+<ul>
+<li><a href="Christophe.Boulain@ceram.fr">Christophe Boulain</a></li>
+</ul>
+
<h3>Prado v2 Maintenance Team</h3>
<ul>
<li><a href="mailto:rodolfo@equinoxe.g-networks.net">Rodolfo Gonzales</a></li>
@@ -111,7 +116,7 @@ PRADO component tags when you use it to edit PRADO templates.
<ul>
<li>Stever for providing an Apple G3 notebook for testing safari browser issues.</li>
<li>Stanislav Yordanov - the script of generating Dreameweaver extension for PRADO</li>
-<li>Andrés Adolfo Testi - original concept and naming for Active Controls.</li>
+<li>Andrés Adolfo Testi - original concept and naming for Active Controls.</li>
<li><a href="http://www.jackslocum.com/">Jack Slocum</a> - inspiration for the quickstart commenting system.</li>
<li>Cesar Ramos - Active Record driver for IBM DB2.</li>
<li>All PRADO users - great suggestions, feedback and support</li>