diff options
author | xue <> | 2007-09-11 02:09:27 +0000 |
---|---|---|
committer | xue <> | 2007-09-11 02:09:27 +0000 |
commit | 269c9a0010c2495db961c185e83fd52b33b04d73 (patch) | |
tree | a17692a7e974b103ca679606051b20472e9129e1 /tests/FunctionalTests/tickets/protected700/pages | |
parent | f5fa9b2249423f89f76b24a21d3014234b7f60f6 (diff) |
Fixed #692, #700.
Diffstat (limited to 'tests/FunctionalTests/tickets/protected700/pages')
11 files changed, 152 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected700/pages/Home.page b/tests/FunctionalTests/tickets/protected700/pages/Home.page new file mode 100644 index 00000000..7d1c1187 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/Home.page @@ -0,0 +1,14 @@ +<com:TContent ID="Main">
+
+|Param1: <%= $this->Param1 %>|
+<br/>
+|Param2: <%= $this->Param2 %>|
+<br/>
+|Param3: <%= $this->Param3 %>|
+<br/>
+|Param4: <%= $this->Param4 %>|
+<br/>
+|Param5: <%= $this->Param5 %>|
+<br/>
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/UserLogin.page b/tests/FunctionalTests/tickets/protected700/pages/UserLogin.page new file mode 100644 index 00000000..07d4ece9 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/UserLogin.page @@ -0,0 +1,28 @@ +<com:TContent ID="Main" >
+
+ <com:TLabel
+ ForControl="Username"
+ Text="User Name"
+ CssClass="label"/>
+ <com:TTextBox ID="Username"
+ AccessKey="u"
+ ValidationGroup="login"
+ CssClass="textbox"/>
+<br/>
+ <com:TLabel
+ ForControl="Password"
+ Text="Password"
+ CssClass="label"/>
+ <com:TTextBox ID="Password"
+ AccessKey="p"
+ CssClass="textbox"
+ ValidationGroup="login"
+ TextMode="Password"/>
+<br/>
+ <com:TButton ID="LoginButton"
+ OnClick="loginButtonClicked"
+ Text="Login"
+ ValidationGroup="login"
+ CssClass="button"/>
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/UserLogin.php b/tests/FunctionalTests/tickets/protected700/pages/UserLogin.php new file mode 100644 index 00000000..37258879 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/UserLogin.php @@ -0,0 +1,13 @@ +<?php
+
+class UserLogin extends BasePage
+{
+ public function loginButtonClicked($sender,$param)
+ {
+ $authManager=$this->Application->getModule('auth');
+ $authManager->login($this->Username->Text,$this->Password->Text);
+ $this->Response->redirect($this->Service->constructUrl('Home'));
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/admin/Home.page b/tests/FunctionalTests/tickets/protected700/pages/admin/Home.page new file mode 100644 index 00000000..7d1c1187 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/admin/Home.page @@ -0,0 +1,14 @@ +<com:TContent ID="Main">
+
+|Param1: <%= $this->Param1 %>|
+<br/>
+|Param2: <%= $this->Param2 %>|
+<br/>
+|Param3: <%= $this->Param3 %>|
+<br/>
+|Param4: <%= $this->Param4 %>|
+<br/>
+|Param5: <%= $this->Param5 %>|
+<br/>
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/admin/Home2.page b/tests/FunctionalTests/tickets/protected700/pages/admin/Home2.page new file mode 100644 index 00000000..7d1c1187 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/admin/Home2.page @@ -0,0 +1,14 @@ +<com:TContent ID="Main">
+
+|Param1: <%= $this->Param1 %>|
+<br/>
+|Param2: <%= $this->Param2 %>|
+<br/>
+|Param3: <%= $this->Param3 %>|
+<br/>
+|Param4: <%= $this->Param4 %>|
+<br/>
+|Param5: <%= $this->Param5 %>|
+<br/>
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/admin/config.xml b/tests/FunctionalTests/tickets/protected700/pages/admin/config.xml new file mode 100644 index 00000000..04ac6bdd --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/admin/config.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <authorization>
+ <allow pages="Home2" users="*" />
+ <deny pages="users.Home" roles="user" />
+ </authorization>
+ <pages Param2="Set at admin">
+ <page id="users.Home" Param1="Set at admin" Param4="Set at admin" />
+ <page id="Home" Param3="Set at admin" />
+ </pages>
+</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/admin/users/Home.page b/tests/FunctionalTests/tickets/protected700/pages/admin/users/Home.page new file mode 100644 index 00000000..7d1c1187 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/admin/users/Home.page @@ -0,0 +1,14 @@ +<com:TContent ID="Main">
+
+|Param1: <%= $this->Param1 %>|
+<br/>
+|Param2: <%= $this->Param2 %>|
+<br/>
+|Param3: <%= $this->Param3 %>|
+<br/>
+|Param4: <%= $this->Param4 %>|
+<br/>
+|Param5: <%= $this->Param5 %>|
+<br/>
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/admin/users/Home2.page b/tests/FunctionalTests/tickets/protected700/pages/admin/users/Home2.page new file mode 100644 index 00000000..7d1c1187 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/admin/users/Home2.page @@ -0,0 +1,14 @@ +<com:TContent ID="Main">
+
+|Param1: <%= $this->Param1 %>|
+<br/>
+|Param2: <%= $this->Param2 %>|
+<br/>
+|Param3: <%= $this->Param3 %>|
+<br/>
+|Param4: <%= $this->Param4 %>|
+<br/>
+|Param5: <%= $this->Param5 %>|
+<br/>
+
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/admin/users/config.xml b/tests/FunctionalTests/tickets/protected700/pages/admin/users/config.xml new file mode 100644 index 00000000..175ea5c7 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/admin/users/config.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <pages>
+ <page id="Home" Param2="Set at admin.users" />
+ </pages>
+</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/config.xml b/tests/FunctionalTests/tickets/protected700/pages/config.xml new file mode 100644 index 00000000..416de43f --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/config.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+ <authorization>
+ <allow pages="content.*" users="*" />
+ </authorization>
+ <pages Param2="Set at root">
+ <page id="users.Home" Param1="Set at admin" Param4="Set at admin" />
+ <page id="Home" Param5="Set at root" />
+ </pages>
+</configuration>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected700/pages/content/Home.page b/tests/FunctionalTests/tickets/protected700/pages/content/Home.page new file mode 100644 index 00000000..7d1c1187 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected700/pages/content/Home.page @@ -0,0 +1,14 @@ +<com:TContent ID="Main">
+
+|Param1: <%= $this->Param1 %>|
+<br/>
+|Param2: <%= $this->Param2 %>|
+<br/>
+|Param3: <%= $this->Param3 %>|
+<br/>
+|Param4: <%= $this->Param4 %>|
+<br/>
+|Param5: <%= $this->Param5 %>|
+<br/>
+
+</com:TContent>
\ No newline at end of file |