gatein SVN: r2508 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-04-06 23:10:59 -0400 (Tue, 06 Apr 2010)
New Revision: 2508
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_008_SignInByClickTheseAcoountOnHomepage.html
Log:
GTNPORTAL-1013: Create new test for "POR_01_008"
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_008_SignInByClickTheseAcoountOnHomepage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_008_SignInByClickTheseAcoountOnHomepage.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_008_SignInByClickTheseAcoountOnHomepage.html 2010-04-07 03:10:59 UTC (rev 2508)
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://localhost:8080/portal/public/classic/" />
+<title>Test_POR_01_008_SignInByClickTheseAcoountOnHomepage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_01_008_SignInByClickTheseAcoountOnHomepage</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login by Root--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Administrator</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Administrator</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login byJohn--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Manager</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Manager</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login by mary--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=User</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=User</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login by Demo--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Demo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Demo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 2 months
gatein SVN: r2507 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-04-06 23:10:27 -0400 (Tue, 06 Apr 2010)
New Revision: 2507
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_005_SignInByUnregisteredUserName.html
Log:
GTNPORTAL-1012: Create new test for "POR_01_005"
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_005_SignInByUnregisteredUserName.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_005_SignInByUnregisteredUserName.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_005_SignInByUnregisteredUserName.html 2010-04-07 03:10:27 UTC (rev 2507)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_01_005_SignInByUnregisteredUserName</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_01_005_SignInByUnregisteredUserName</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td>POR_01_006</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>POR_01_006</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>POR_01_006</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>POR_01_006</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 2 months
gatein SVN: r2506 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-04-06 23:09:14 -0400 (Tue, 06 Apr 2010)
New Revision: 2506
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_003_SignInByNormalAccount.html
Log:
GTNPORTAL-1011: Create new test for "POR_01_003"
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_003_SignInByNormalAccount.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_003_SignInByNormalAccount.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_003_SignInByNormalAccount.html 2010-04-07 03:09:14 UTC (rev 2506)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_01_003_SignInByNormalAccount</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_01_003_SignInByNormalAccount</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login by Demo account--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td>demo</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>demo</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login by Mary account--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td>mary</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>mary</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 2 months
gatein SVN: r2505 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-04-06 23:08:34 -0400 (Tue, 06 Apr 2010)
New Revision: 2505
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_002_SignInByAdminAccount.html
Log:
GTNPORTAL-1010: Create new test for "POR_01_002"
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_002_SignInByAdminAccount.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_002_SignInByAdminAccount.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/design/Test_POR_01_002_SignInByAdminAccount.html 2010-04-07 03:08:34 UTC (rev 2505)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_01_002_SignInByAdminAccount</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_01_002_SignInByAdminAccount</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login by Admin account--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 2 months
gatein SVN: r2504 - portal/trunk/testsuite.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-04-06 22:22:59 -0400 (Tue, 06 Apr 2010)
New Revision: 2504
Added:
portal/trunk/testsuite/GateIn_v3.0_MainFucntions_TestDefinition.ods
Removed:
portal/trunk/testsuite/GateIn_v3.0_MainFucntions_TestDefinition.ods
Log:
Update "GateIn_v3.0_MainFucntions_TestDefinition.ods"
Deleted: portal/trunk/testsuite/GateIn_v3.0_MainFucntions_TestDefinition.ods
===================================================================
(Binary files differ)
Added: portal/trunk/testsuite/GateIn_v3.0_MainFucntions_TestDefinition.ods
===================================================================
(Binary files differ)
Property changes on: portal/trunk/testsuite/GateIn_v3.0_MainFucntions_TestDefinition.ods
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 2 months
gatein SVN: r2503 - portal/trunk/testsuite.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-04-06 22:20:53 -0400 (Tue, 06 Apr 2010)
New Revision: 2503
Modified:
portal/trunk/testsuite/GateIn_v3.0_BasicPortlets_TestDefinition.ods
Log:
Update GateIn_v3.0_BasicPortlets_TestDefinition.ods
Modified: portal/trunk/testsuite/GateIn_v3.0_BasicPortlets_TestDefinition.ods
===================================================================
(Binary files differ)
14 years, 2 months
gatein SVN: r2502 - components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2010-04-06 14:46:53 -0400 (Tue, 06 Apr 2010)
New Revision: 2502
Modified:
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SPNEGORolesModule.java
Log:
spnego ready to roll
Modified: components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SPNEGORolesModule.java
===================================================================
--- components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SPNEGORolesModule.java 2010-04-06 18:34:53 UTC (rev 2501)
+++ components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SPNEGORolesModule.java 2010-04-06 18:46:53 UTC (rev 2502)
@@ -24,14 +24,8 @@
import java.security.Principal;
import java.security.acl.Group;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
import java.util.Map;
-import java.util.Set;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
import javax.security.auth.Subject;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.login.LoginException;
@@ -46,8 +40,6 @@
import org.exoplatform.services.security.Identity;
import org.exoplatform.services.security.Authenticator;
import org.exoplatform.services.security.IdentityRegistry;
-import org.exoplatform.container.monitor.jvm.J2EEServerInfo;
-import org.exoplatform.services.security.jaas.UserPrincipal;
/**
* The LoginModule that is responsible for setting up the proper GateIn roles
@@ -200,96 +192,4 @@
throw new LoginException(e.getMessage());
}
}
-
- @Override
- public boolean logout() throws LoginException
- {
- org.exoplatform.container.monitor.jvm.J2EEServerInfo info = new J2EEServerInfo();
- MBeanServer jbossServer = info.getMBeanServer();
-
- //
- if (jbossServer != null)
- {
- try
- {
-
- log.debug("Performing JBoss security manager cache eviction");
-
- ObjectName securityManagerName = new ObjectName(
- "jboss.security:service=JaasSecurityManager");
-
- // Obtain user name
- String userName = null;
- Set<UserPrincipal> userPrincipals = subject
- .getPrincipals(UserPrincipal.class);
- if (!userPrincipals.isEmpty())
- {
- // There should be one
- userName = userPrincipals.iterator().next().getName();
- }
-
- //
- if (userName != null)
- {
- log
- .debug("Going to perform JBoss security manager cache eviction for user "
- + userName);
-
- //
- List allPrincipals = (List) jbossServer.invoke(securityManagerName,
- "getAuthenticationCachePrincipals", new Object[] { realmName },
- new String[] { String.class.getName() });
-
- // Make a copy to avoid some concurrent mods
- allPrincipals = new ArrayList(allPrincipals);
-
- // Lookup for invalidation key, it must be the same principal!
- Principal key = null;
- for (Iterator i = allPrincipals.iterator(); i.hasNext();)
- {
- Principal principal = (Principal) i.next();
- if (principal.getName().equals(userName))
- {
- key = principal;
- break;
- }
- }
-
- // Perform invalidation
- if (key != null)
- {
- jbossServer.invoke(securityManagerName, "flushAuthenticationCache",
- new Object[] { realmName, key }, new String[] {
- String.class.getName(), Principal.class.getName() });
- log
- .debug("Performed JBoss security manager cache eviction for user "
- + userName + " with principal " + key);
- }
- else
- {
- log
- .warn("No principal found when performing JBoss security manager cache eviction for user "
- + userName);
- }
- }
- else
- {
- log
- .warn("No user name found when performing JBoss security manager cache eviction");
- }
- }
- catch (Exception e)
- {
- log.error("Could not perform JBoss security manager cache eviction", e);
- }
- }
- else
- {
- log
- .debug("Could not find mbean server for performing JBoss security manager cache eviction");
- }
-
- //
- return true;
- }
}
14 years, 2 months
gatein SVN: r2501 - in components/sso/trunk: agent and 3 other directories.
by do-not-reply@jboss.org
Author: sohil.shah(a)jboss.com
Date: 2010-04-06 14:34:53 -0400 (Tue, 06 Apr 2010)
New Revision: 2501
Added:
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOFilter.java
Removed:
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOTxFilter.java
Modified:
components/sso/trunk/.classpath
components/sso/trunk/agent/pom.xml
components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SPNEGORolesModule.java
components/sso/trunk/spnego/pom.xml
Log:
spnego cleanup
Modified: components/sso/trunk/.classpath
===================================================================
--- components/sso/trunk/.classpath 2010-04-06 18:34:38 UTC (rev 2500)
+++ components/sso/trunk/.classpath 2010-04-06 18:34:53 UTC (rev 2501)
@@ -17,7 +17,7 @@
<classpathentry kind="src" output="josso/gatein-josso-plugin/target/classes" path="josso/gatein-josso-plugin/src/main/java"/>
<classpathentry kind="src" output="opensso/gatein-opensso-plugin/target/classes" path="opensso/gatein-opensso-plugin/src/main/java"/>
<classpathentry excluding="**" kind="src" output="opensso/gatein-opensso-portal/target/classes" path="opensso/gatein-opensso-portal/src/main/resources"/>
- <classpathentry kind="src" output="spengo/target/classes" path="spnego/src/main/java"/>
+ <classpathentry kind="src" output="spnego/target/classes" path="spnego/src/main/java"/>
<classpathentry excluding="**" kind="src" output="packaging/target/classes" path="packaging/src/main/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
Modified: components/sso/trunk/agent/pom.xml
===================================================================
--- components/sso/trunk/agent/pom.xml 2010-04-06 18:34:38 UTC (rev 2500)
+++ components/sso/trunk/agent/pom.xml 2010-04-06 18:34:53 UTC (rev 2501)
@@ -14,7 +14,7 @@
<properties>
<!-- ChangeMe to your specific local environment -->
- <gatein.location>/home/soshah/projects/gatein/runtime/jboss/server/default</gatein.location>
+ <gatein.location>/home/soshah/projects/gatein/portal/trunk/packaging/pkg/target/jboss/server/gatein-spnego</gatein.location>
</properties>
<dependencies>
Copied: components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOFilter.java (from rev 2477, components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOTxFilter.java)
===================================================================
--- components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOFilter.java (rev 0)
+++ components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOFilter.java 2010-04-06 18:34:53 UTC (rev 2501)
@@ -0,0 +1,153 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.gatein.sso.agent.filter;
+
+import java.io.IOException;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+import javax.transaction.TransactionManager;
+import javax.transaction.Status;
+import javax.naming.InitialContext;
+
+import org.exoplatform.container.web.AbstractFilter;
+import org.exoplatform.services.organization.OrganizationService;
+import org.exoplatform.services.organization.User;
+import org.exoplatform.services.security.Authenticator;
+import org.exoplatform.services.security.IdentityRegistry;
+import org.exoplatform.services.security.Identity;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class SPNEGOFilter extends AbstractFilter
+{
+
+ public void destroy()
+ {
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response,
+ FilterChain chain) throws IOException, ServletException
+ {
+ HttpServletRequest httpRequest = (HttpServletRequest)request;
+
+ boolean isStartedHere = this.startTx();
+ try
+ {
+ String remoteUser = httpRequest.getRemoteUser();
+
+ //System.out.println("-----------------------------------------------------------------");
+ //System.out.println("SPNEGO TX Filter (TX Started: )"+isStartedHere);
+ //System.out.println("RequestURL: "+httpRequest.getRequestURI());
+ //System.out.println("RemoteUser: "+remoteUser);
+
+ if(remoteUser != null)
+ {
+ //Check and make sure the IdentityRegistry is consistent
+ IdentityRegistry identityRegistry = (IdentityRegistry) getContainer()
+ .getComponentInstanceOfType(IdentityRegistry.class);
+ if(identityRegistry.getIdentity(remoteUser) == null)
+ {
+ Authenticator authenticator = (Authenticator) getContainer()
+ .getComponentInstanceOfType(Authenticator.class);
+
+ Identity identity = authenticator.createIdentity(remoteUser);
+ identityRegistry.register(identity);
+ }
+
+ OrganizationService orgService =
+ (OrganizationService)getContainer().getComponentInstanceOfType(OrganizationService.class);
+ User user = orgService.getUserHandler().findUserByName(remoteUser);
+
+ //System.out.println("Exo User : "+user);
+ }
+ //System.out.println("-----------------------------------------------------------------");
+
+ chain.doFilter(request, response);
+
+ if(isStartedHere)
+ {
+ this.commit();
+ }
+ }
+ catch(Throwable t)
+ {
+ if(isStartedHere)
+ {
+ this.rollback();
+ }
+
+ throw new RuntimeException(t);
+ }
+ }
+
+ private boolean startTx()
+ {
+ try
+ {
+ TransactionManager tm = (TransactionManager)new InitialContext().lookup("java:/TransactionManager");
+
+ if(tm.getStatus() == Status.STATUS_NO_TRANSACTION)
+ {
+ tm.begin();
+ return true;
+ }
+
+ return false;
+ }
+ catch(Throwable t)
+ {
+ return false;
+ }
+ }
+
+ private void commit()
+ {
+ try
+ {
+ TransactionManager tm = (TransactionManager)new InitialContext().lookup("java:/TransactionManager");
+ tm.commit();
+ }
+ catch(Throwable t)
+ {
+ throw new RuntimeException(t);
+ }
+ }
+
+ private void rollback()
+ {
+ try
+ {
+ TransactionManager tm = (TransactionManager)new InitialContext().lookup("java:/TransactionManager");
+ tm.rollback();
+ }
+ catch(Throwable t)
+ {
+ throw new RuntimeException(t);
+ }
+ }
+}
Deleted: components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOTxFilter.java
===================================================================
--- components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOTxFilter.java 2010-04-06 18:34:38 UTC (rev 2500)
+++ components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/filter/SPNEGOTxFilter.java 2010-04-06 18:34:53 UTC (rev 2501)
@@ -1,145 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.gatein.sso.agent.filter;
-
-import java.io.IOException;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-
-import javax.transaction.TransactionManager;
-import javax.transaction.Status;
-import javax.naming.InitialContext;
-
-import org.exoplatform.container.web.AbstractFilter;
-import org.exoplatform.services.organization.OrganizationService;
-import org.exoplatform.services.organization.User;
-
-/**
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- */
-public class SPNEGOTxFilter extends AbstractFilter
-{
-
- public void destroy()
- {
- }
-
- public void doFilter(ServletRequest request, ServletResponse response,
- FilterChain chain) throws IOException, ServletException
- {
- HttpServletRequest httpRequest = (HttpServletRequest)request;
-
- boolean isStartedHere = this.startTx();
- try
- {
- String remoteUser = httpRequest.getRemoteUser();
-
- System.out.println("-----------------------------------------------------------------");
- System.out.println("SPNEGO TX Filter invoked...(TX Started: )"+isStartedHere);
- System.out.println("RequestURL: "+httpRequest.getRequestURI());
- System.out.println("RemoteUser: "+remoteUser);
-
- if(remoteUser != null)
- {
- OrganizationService orgService =
- (OrganizationService)getContainer().getComponentInstanceOfType(OrganizationService.class);
- User user = orgService.getUserHandler().findUserByName(remoteUser);
-
- System.out.println("Exo User: "+user);
- }
- System.out.println("-----------------------------------------------------------------");
-
- chain.doFilter(request, response);
-
- if(isStartedHere)
- {
- this.commit();
- }
- }
- catch(Throwable t)
- {
- t.printStackTrace();
-
- if(isStartedHere)
- {
- this.rollback();
- }
-
- throw new RuntimeException(t);
- }
- }
-
- private boolean startTx()
- {
- try
- {
- TransactionManager tm = (TransactionManager)new InitialContext().lookup("java:/TransactionManager");
-
- if(tm.getStatus() == Status.STATUS_NO_TRANSACTION)
- {
- tm.begin();
- return true;
- }
-
- return false;
- }
- catch(Throwable t)
- {
- t.printStackTrace();
- return false;
- }
- }
-
- private void commit()
- {
- try
- {
- TransactionManager tm = (TransactionManager)new InitialContext().lookup("java:/TransactionManager");
- tm.commit();
- }
- catch(Throwable t)
- {
- t.printStackTrace();
- throw new RuntimeException(t);
- }
- }
-
- private void rollback()
- {
- try
- {
- TransactionManager tm = (TransactionManager)new InitialContext().lookup("java:/TransactionManager");
- tm.rollback();
- }
- catch(Throwable t)
- {
- t.printStackTrace();
- throw new RuntimeException(t);
- }
- }
-}
Modified: components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SPNEGORolesModule.java
===================================================================
--- components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SPNEGORolesModule.java 2010-04-06 18:34:38 UTC (rev 2500)
+++ components/sso/trunk/agent/src/main/java/org/gatein/sso/agent/login/SPNEGORolesModule.java 2010-04-06 18:34:53 UTC (rev 2501)
@@ -50,7 +50,8 @@
import org.exoplatform.services.security.jaas.UserPrincipal;
/**
- * The LoginModule that is responsible for setting up the proper GateIn roles corresponding to the SPNEGO principal that was authenticated
+ * The LoginModule that is responsible for setting up the proper GateIn roles
+ * corresponding to the SPNEGO principal that was authenticated
*
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
*/
@@ -63,7 +64,7 @@
private static final String OPTION_REALM_NAME = "realmName";
private String portalContainerName;
private String realmName;
-
+
private String getPortalContainerName(Map options)
{
if (options != null)
@@ -178,9 +179,9 @@
.getComponentInstanceOfType(IdentityRegistry.class);
// Check for single check
- if(identityRegistry.getIdentity(this.identity.getUserId()) != null)
+ if (identityRegistry.getIdentity(this.identity.getUserId()) != null)
{
- //already logged in
+ // already logged in
return true;
}
@@ -199,87 +200,96 @@
throw new LoginException(e.getMessage());
}
}
-
+
@Override
- public boolean logout() throws LoginException
- {
- org.exoplatform.container.monitor.jvm.J2EEServerInfo info = new J2EEServerInfo();
- MBeanServer jbossServer = info.getMBeanServer();
+ public boolean logout() throws LoginException
+ {
+ org.exoplatform.container.monitor.jvm.J2EEServerInfo info = new J2EEServerInfo();
+ MBeanServer jbossServer = info.getMBeanServer();
- //
- if (jbossServer != null)
- {
- try
- {
+ //
+ if (jbossServer != null)
+ {
+ try
+ {
- log.debug("Performing JBoss security manager cache eviction");
+ log.debug("Performing JBoss security manager cache eviction");
- ObjectName securityManagerName = new ObjectName("jboss.security:service=JaasSecurityManager");
+ ObjectName securityManagerName = new ObjectName(
+ "jboss.security:service=JaasSecurityManager");
- // Obtain user name
- String userName = null;
- Set<UserPrincipal> userPrincipals = subject.getPrincipals(UserPrincipal.class);
- if (!userPrincipals.isEmpty())
- {
- // There should be one
- userName = userPrincipals.iterator().next().getName();
- }
+ // Obtain user name
+ String userName = null;
+ Set<UserPrincipal> userPrincipals = subject
+ .getPrincipals(UserPrincipal.class);
+ if (!userPrincipals.isEmpty())
+ {
+ // There should be one
+ userName = userPrincipals.iterator().next().getName();
+ }
- //
- if (userName != null)
- {
- log.debug("Going to perform JBoss security manager cache eviction for user " + userName);
+ //
+ if (userName != null)
+ {
+ log
+ .debug("Going to perform JBoss security manager cache eviction for user "
+ + userName);
- //
- List allPrincipals =
- (List)jbossServer.invoke(securityManagerName, "getAuthenticationCachePrincipals",
- new Object[]{realmName}, new String[]{String.class.getName()});
+ //
+ List allPrincipals = (List) jbossServer.invoke(securityManagerName,
+ "getAuthenticationCachePrincipals", new Object[] { realmName },
+ new String[] { String.class.getName() });
- // Make a copy to avoid some concurrent mods
- allPrincipals = new ArrayList(allPrincipals);
+ // Make a copy to avoid some concurrent mods
+ allPrincipals = new ArrayList(allPrincipals);
- // Lookup for invalidation key, it must be the same principal!
- Principal key = null;
- for (Iterator i = allPrincipals.iterator(); i.hasNext();)
- {
- Principal principal = (Principal)i.next();
- if (principal.getName().equals(userName))
- {
- key = principal;
- break;
- }
- }
+ // Lookup for invalidation key, it must be the same principal!
+ Principal key = null;
+ for (Iterator i = allPrincipals.iterator(); i.hasNext();)
+ {
+ Principal principal = (Principal) i.next();
+ if (principal.getName().equals(userName))
+ {
+ key = principal;
+ break;
+ }
+ }
- // Perform invalidation
- if (key != null)
- {
- jbossServer.invoke(securityManagerName, "flushAuthenticationCache", new Object[]{realmName, key},
- new String[]{String.class.getName(), Principal.class.getName()});
- log.debug("Performed JBoss security manager cache eviction for user " + userName + " with principal "
- + key);
- }
- else
- {
- log.warn("No principal found when performing JBoss security manager cache eviction for user "
- + userName);
- }
- }
- else
- {
- log.warn("No user name found when performing JBoss security manager cache eviction");
- }
- }
- catch (Exception e)
- {
- log.error("Could not perform JBoss security manager cache eviction", e);
- }
- }
- else
- {
- log.debug("Could not find mbean server for performing JBoss security manager cache eviction");
- }
+ // Perform invalidation
+ if (key != null)
+ {
+ jbossServer.invoke(securityManagerName, "flushAuthenticationCache",
+ new Object[] { realmName, key }, new String[] {
+ String.class.getName(), Principal.class.getName() });
+ log
+ .debug("Performed JBoss security manager cache eviction for user "
+ + userName + " with principal " + key);
+ }
+ else
+ {
+ log
+ .warn("No principal found when performing JBoss security manager cache eviction for user "
+ + userName);
+ }
+ }
+ else
+ {
+ log
+ .warn("No user name found when performing JBoss security manager cache eviction");
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Could not perform JBoss security manager cache eviction", e);
+ }
+ }
+ else
+ {
+ log
+ .debug("Could not find mbean server for performing JBoss security manager cache eviction");
+ }
- //
- return true;
- }
+ //
+ return true;
+ }
}
Modified: components/sso/trunk/spnego/pom.xml
===================================================================
--- components/sso/trunk/spnego/pom.xml 2010-04-06 18:34:38 UTC (rev 2500)
+++ components/sso/trunk/spnego/pom.xml 2010-04-06 18:34:53 UTC (rev 2501)
@@ -14,7 +14,7 @@
<properties>
<!-- ChangeMe to your specific local environment -->
- <gatein.location>/home/soshah/projects/gatein/runtime/jboss/server/default</gatein.location>
+ <gatein.location>/home/soshah/projects/gatein/portal/trunk/packaging/pkg/target/jboss/server/gatein-spnego</gatein.location>
</properties>
<dependencies>
14 years, 2 months
gatein SVN: r2500 - portal/branches/EPP_5_0_Branch/webui/core/src/main/java/org/exoplatform/webui/form.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-04-06 14:34:38 -0400 (Tue, 06 Apr 2010)
New Revision: 2500
Modified:
portal/branches/EPP_5_0_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormMultiValueInputSet.java
Log:
JBEPP-223: Create an Upload MutiValued field
To keep in sync
Modified: portal/branches/EPP_5_0_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormMultiValueInputSet.java
===================================================================
--- portal/branches/EPP_5_0_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormMultiValueInputSet.java 2010-04-06 18:10:01 UTC (rev 2499)
+++ portal/branches/EPP_5_0_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormMultiValueInputSet.java 2010-04-06 18:34:38 UTC (rev 2500)
@@ -53,7 +53,7 @@
/**
* The type of items in the selector
*/
- private Class<? extends UIFormInput> clazz_;
+ private Class<? extends UIFormInputBase> clazz_;
private Constructor constructor_ = null;
@@ -83,7 +83,7 @@
return List.class;
}
- public void setType(Class<? extends UIFormInput> clazz)
+ public void setType(Class<? extends UIFormInputBase> clazz)
{
this.clazz_ = clazz;
Constructor[] constructors = clazz_.getConstructors();
@@ -91,7 +91,7 @@
constructor_ = constructors[0];
}
- public Class<? extends UIFormInput> getUIFormInputBase()
+ public Class<? extends UIFormInputBase> getUIFormInputBase()
{
return clazz_;
}
@@ -199,6 +199,8 @@
public UIFormInputBase createUIFormInput(int idx) throws Exception
{
+
+ if(constructor_ == null) return null;
Class[] classes = constructor_.getParameterTypes();
Object[] params = new Object[classes.length];
for (int i = 0; i < classes.length; i++)
14 years, 2 months
gatein SVN: r2499 - portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-04-06 14:10:01 -0400 (Tue, 06 Apr 2010)
New Revision: 2499
Modified:
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
Log:
JBEPP-225: Error on deleting last tab in some scenario
Modified: portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-04-06 14:37:28 UTC (rev 2498)
+++ portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-04-06 18:10:01 UTC (rev 2499)
@@ -64,7 +64,9 @@
//This code snippet is to make sure that Javascript/Skin is fully loaded at the first request
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
PortalRequestContext pcontext = Util.getPortalRequestContext();
-
+ pcontext.setFullRender(true);
+ pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
+
PageNavigation currentNav = showedUIPortal.getSelectedNavigation();
String currentUri = showedUIPortal.getSelectedNode().getUri();
if(currentUri.startsWith("/"))
@@ -110,7 +112,6 @@
showedUIPortal.setSelectedNode(targetPageNode);
showedUIPortal.setSelectedPath(targetedPathNodes);
showedUIPortal.refreshUIPage();
- pcontext.setFullRender(true);
return;
}
}
@@ -120,7 +121,6 @@
// First, we try to find a cached UIPortal
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
- pcontext.setFullRender(true);
UIPortal cachedUIPortal = uiPortalApp.getCachedUIPortal(newNavType, newNavId);
if (cachedUIPortal != null)
{
14 years, 2 months