gatein SVN: r2246 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-14 07:44:08 -0400 (Sun, 14 Mar 2010)
New Revision: 2246
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
Log:
Unused import
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2010-03-14 10:55:14 UTC (rev 2245)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2010-03-14 11:44:08 UTC (rev 2246)
@@ -24,7 +24,6 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.web.security.GateInToken;
import org.exoplatform.web.security.Token;
import org.exoplatform.web.security.security.RemindPasswordTokenService;
import org.exoplatform.webui.application.WebuiRequestContext;
16 years, 1 month
gatein SVN: r2245 - in portal/trunk/docs/reference-guide/en: modules and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-14 06:55:14 -0400 (Sun, 14 Mar 2010)
New Revision: 2245
Added:
portal/trunk/docs/reference-guide/en/modules/configuration/EMailService_Configuration.xml
Modified:
portal/trunk/docs/reference-guide/en/Introduction.xml
portal/trunk/docs/reference-guide/en/modules/Configuration.xml
portal/trunk/docs/reference-guide/en/modules/Foundations.xml
portal/trunk/docs/reference-guide/en/modules/Portlets.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml
portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml
Log:
Doc update
Modified: portal/trunk/docs/reference-guide/en/Introduction.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/Introduction.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/Introduction.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -1,24 +1,3 @@
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- 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.
-
--->
-
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.4//EN" "http://www.oasis-open.org/docbook/sgml/4.4/docbookx.dtd">
<chapter>
<title>Introduction</title>
@@ -45,7 +24,7 @@
<listitem>
<para>
GateIn videos:
- <ulink url="http://www.jboss.org/gatein/videos.html">www.jboss.org/gatein/videos.html</ulink>
+ <ulink url="http://vimeo.com/channels/gatein">vimeo.com/channels/gatein</ulink>
</para>
</listitem>
<listitem>
Modified: portal/trunk/docs/reference-guide/en/modules/Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Configuration.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/Configuration.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -5,16 +5,19 @@
]>
<chapter id="chap-Reference_Guide-Configuration">
<title>Configuration</title>
+ <xi:include href="configuration/Database_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="configuration/EMailService_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="configuration/Default_Portal_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/IDM_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="configuration/Default_Portal_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/Portal_Navigation_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="configuration/Authentication_Token_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/Predefined_User_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/Portal_Default_Permission_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!-- Kernel/Service_Configuration_for_Beginners --><!-- Kernel/Service_Configuration_in_Detail --><xi:include href="configuration/Database_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- Kernel/Service_Configuration_for_Beginners -->
+ <!-- Kernel/Service_Configuration_in_Detail -->
<xi:include href="configuration/Data_Injector_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<!-- Core/LDAP_Configuration --><xi:include href="configuration/Skin_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/JavaScript_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="configuration/Dashboard_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="configuration/Authentication_Token_Configuration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>
Modified: portal/trunk/docs/reference-guide/en/modules/Foundations.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Foundations.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/Foundations.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -2,8 +2,6 @@
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
%BOOK_ENTITIES;
-<!ENTITY % BOOK_ENTITIES SYSTEM "../Reference_Guide.ent">
-%BOOK_ENTITIES;
]>
<chapter id="chap-Reference_Guide-Foundations" xmlns:x="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
@@ -429,7 +427,7 @@
which returns the current <emphasis role="bold">PortalContainer</emphasis>.
If your servlet handles the requests by implementing a <emphasis role="bold">service()</emphasis> method, you need to rename that method to match
- the following signature:
+ the following signature:</para>
<programlisting role="JAVA"><![CDATA[
/**
* Use this method instead of Servlet.service()
@@ -437,8 +435,6 @@
protected void onService(ExoContainer container, HttpServletRequest req,
HttpServletResponse res) throws ServletException, IOException;
]]></programlisting>
-
- </para>
<note>
The reason is that AbstractHttpServlet implements service() to perform its interception, and you don't want to
overwrite (by overriding) this functionality.
@@ -446,7 +442,7 @@
<para>
You may also need to access portal information within your <emphasis role="bold">HttpSessionListener</emphasis>. Again, make sure to extend the
provided abstract class - <emphasis role="bold">org.exoplatform.container.web. AbstractHttpSessionListener</emphasis>.
- Also, modify your method signitures as follows:
+ Also, modify your method signitures as follows:</para>
<programlisting role="JAVA"><![CDATA[
/**
* Use this method instead of HttpSessionListener.sessionCreated()
@@ -458,9 +454,8 @@
*/
protected void onSessionDestroyed(ExoContainer container, HttpSessionEvent event);
]]></programlisting>
- </para>
<para>
- There is another method you have to implement in this case:
+ There is another method you have to implement in this case:</para>
<programlisting role="JAVA"><![CDATA[
/**
* Method should return true if unified servlet context,
@@ -468,7 +463,7 @@
*/
protected boolean requirePortalEnvironment();
]]></programlisting>
-
+ <para>
If this method returns true, current thread's context classloader is set up according to <emphasis role="bold">Dependencies</emphasis>
configuration, and availability of the associated web applications. If it returns false, the standard
application separation rules are used for resource loading (effectively turning off the
Modified: portal/trunk/docs/reference-guide/en/modules/Portlets.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/Portlets.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/Portlets.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -5,11 +5,18 @@
]>
<chapter id="chap-Reference_Guide-Portlet_development">
<title>Portlet development</title>
+ <!-- Commented out as it's not for public usage -->
+ <!--
<xi:include href="portlets/WebUI.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ -->
<xi:include href="portlets/AJAX_in_GateIn_Framework.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="portlets/Groovy_Templates.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="portlets/Portlet_Lifecycle.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="portlets/Standard.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <!-- Unedited pending new example --> <xi:include href="portlets/Create_a_WebUI_Portlet.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <!-- Unedited pending new example -->
+ <!-- Commented out as it's not for public usage -->
+ <!--
+ <xi:include href="portlets/Create_a_WebUI_Portlet.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ -->
</chapter>
Modified: portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/configuration/Authentication_Token_Configuration.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -56,7 +56,7 @@
<area coords="8" id="area-Reference_Guide-Authentication_Token_Configuration-Configure_token_services-time" />
<area coords="9" id="area-Reference_Guide-Authentication_Token_Configuration-Configure_token_services-unit" />
</areaspec>
-<programlisting role="XML"><component>
+<programlisting><component>
<key>org.exoplatform.web.security.security.CookieTokenService</key>
<type>org.exoplatform.web.security.security.CookieTokenService</type>
<init-params>
Modified: portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/configuration/Data_Injector_Configuration.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -24,7 +24,7 @@
<title>Service configuration file</title>
<para>
-<programlisting role="XML"><configuration>
+<programlisting><configuration>
<component>
<key>org.exoplatform.portal.initializer.organization.OrganizationInitializer</key>
<type>org.exoplatform.portal.initializer.organization.OrganizationInitializer</type>
Modified: portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -22,7 +22,7 @@
GateIn will automatically generate the proper schema (assuming that the
database user has the appropriate permissions).</para>
- <para>GateIn assumes the default encoding for your database is
+ <para>&PRODUCT; assumes the default encoding for your database is
<literal>latin1</literal> . You will need to change this parameter for
your database in order to work properly.</para>
</section>
@@ -30,29 +30,26 @@
<section id="sect-Reference_Guide-Database_Configuration-JCR_database_configuration">
<title>Configuring the database for JCR</title>
- <para>To configure the databaseused by JCR you will need to edit the
- file:<programlisting>gatein.ear/02portal.war/WEB-INF/conf/jcr/jcr-configuration.xml</programlisting></para>
+ <para>To configure the database used by JCR you will need to edit the
+ file:<programlisting>$JBOSS_HOME/server/default/conf/gatein/configuration.properties</programlisting></para>
- <para>And edit the values of driverClassName, url, username and password
- with the values for your JDBC connection (Please refer to your database
- JDBC driver documentation).</para>
+ <para>For Tomcat, the file is located at <programlisting>$TOMCAT_HOME/gatein/conf/configuration.properties</programlisting></para>
- <programlisting role="XML"><properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr${container.name.suffix}"/>
- property name="username" value="sa"/>
- <property name="password" value=""/>
-</properties-param>
+ <para>And edit the values of driver, url, username and password with the
+ values for your JDBC connection (Please refer to your database JDBC driver
+ documentation).</para>
+
+ <programlisting role="XML">gatein.jcr.datasource.driver=org.hsqldb.jdbcDriver
+gatein.jcr.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr_${name}
+gatein.jcr.datasource.username=sa
+gatein.jcr.datasource.password=
</programlisting>
- <para>In that case, the name of the database is
- "jdbcjcr${container.name.suffix}", ${container.name.suffix} should be part
- of the database name, as it is dynamically replaced by the name of the
- portal extension (for instance gatein-sample-portal.ear defines
- "sample-portal" as container name and the default portal defines "portal"
- as container name). </para>
+ <para>In that case, the name of the database is "jdbcjcr_${name}", ${name}
+ should be part of the database name, as it is dynamically replaced by the
+ name of the portal container extension (for instance
+ gatein-sample-portal.ear defines "sample-portal" as container name and the
+ default portal defines "portal" as container name).</para>
<para>In the case of HSQL the databases are created automatically, for any
other database you will need to create a database named jdbcjcr_portal
@@ -78,14 +75,11 @@
<para>Then we need to add the MySQL JDBC connector in the classpath and
finally edit gatein.ear/02portal.war/WEB-INF/conf/jcr/jcr-configuration
- with:<programlisting><properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://localhost:3306/mygateindb${container.name.suffix}"/>
- <property name="username" value="gateinuser"/>
- <property name="password" value="gateinpassword"/>
-</properties-param></programlisting></para>
+ with:<programlisting>gatein.jcr.datasource.driver=com.mysql.jdbc.Driver
+gatein.jcr.datasource.url=jdbc:mysql://localhost:3306/mygateindb${container.name.suffix}
+gatein.jcr.datasource.username=gateinuser
+gatein.jcr.datasource.password=gateinpassword
+</programlisting></para>
</section>
<section>
@@ -94,18 +88,13 @@
<para>By default users are stored in database. To change the database to
store users, you will need to edit the file:</para>
- <para><programlisting>gatein.ear/02portal.war/WEB-INF/conf/organization/idm-configuration.xml</programlisting>You
- will find the same configuration as in
- jcr-configuration.xml:<programlisting><properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm${container.name.suffix}"/>
- property name="username" value="sa"/>
- <property name="password" value=""/>
-</properties-param></programlisting></para>
+ <para><programlisting>$JBOSS_HOME/server/default/conf/gatein/configuration.properties</programlisting>For
+ Tomcat, the file is located at <programlisting>$TOMCAT_HOME/gatein/conf/configuration.properties</programlisting></para>
- <para>It is recommended to use a different database than the one used by
- JCR.</para>
+ <para>You will find the same configuration as in
+ jcr-configuration.xml:<programlisting>gatein.idm.datasource.driver=org.hsqldb.jdbcDriver
+gatein.idm.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm_${name}
+gatein.idm.datasource.username=sa
+gatein.idm.datasource.password</programlisting></para>
</section>
</section>
Added: portal/trunk/docs/reference-guide/en/modules/configuration/EMailService_Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/configuration/EMailService_Configuration.xml (rev 0)
+++ portal/trunk/docs/reference-guide/en/modules/configuration/EMailService_Configuration.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<section id="sect-Reference_Guide-EMail_Service_Configuration">
+ <title>E-Mail Service Configuration</title>
+
+ <section id="sect-Reference_Guide-EMail_Service_Configuration-Overview">
+ <title>Overview</title>
+
+ <para>&PRODUCT; has a service to send e-mails that requires to be configured
+ before it can work properly. This service is used to send e-mails to users who forgot
+ their username or password for instance.</para>
+
+ </section>
+
+ <section id="sect-Reference_Guide-EMail_Service_Configuration-Parameters">
+ <title>Configuring the database for JCR</title>
+
+ <para>The e-mail service can use any SMTP account that needs to be configured in
+ $JBOSS_HOME/server/default/conf/gatein/configuration.properties
+ (Or $TOMCAT_HOME/gatein/conf/configuration.properties if you are using Tomcat).</para>
+
+ <para>The relevant section looks like:</para>
+
+ <programlisting># EMail
+gatein.email.smtp.username=
+gatein.email.smtp.password=
+gatein.email.smtp.host=smtp.gmail.com
+gatein.email.smtp.port=465
+gatein.email.smtp.starttls.enable=true
+gatein.email.smtp.auth=true
+gatein.email.smtp.socketFactory.port=465
+gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory</programlisting>
+
+ <para>It is preconfigured for GMail so that any GMail account can be easily used (Just use a full gmail address
+ as username and fill-in the password.</para>
+ </section>
+</section>
Modified: portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/configuration/IDM_Configuration.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -37,7 +37,7 @@
<area coords="5" id="area-Reference_Guide-PicketLink_IDM_integration-Configuration_files-JBossIDMServiceImpl" />
<area coords="22" id="area-Reference_Guide-PicketLink_IDM_integration-Configuration_files-JBossIDMOrganizationServiceImpl" />
</areaspec>
-<programlisting role="XML"><configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<programlisting><configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
Modified: portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/configuration/Portal_Navigation_Configuration.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -107,7 +107,7 @@
The portal navigation incorporates the pages that can be accessed when the user is not logged in (if the applicable permissions allow public access). For example; several portal navigations are used when a company has multiple trademarks and each trade has its own website.
</para>
<para>
- The <emphasis role="bold">classic</emphasis> portal is configured by four XML files in the <filename>portal/WEBINF/conf/portal/portal/classic</filename> directory:
+ The <emphasis role="bold">classic</emphasis> portal is configured by four XML files in the <filename>02portal.war:/WEB-INF/conf/portal/portal/classic</filename> directory:
</para>
<variablelist>
<varlistentry>
Modified: portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml 2010-03-14 10:54:08 UTC (rev 2244)
+++ portal/trunk/docs/reference-guide/en/modules/development/JavaScript_Inter_Application_Communication.xml 2010-03-14 10:55:14 UTC (rev 2245)
@@ -246,7 +246,7 @@
</section>
<section id="sect-Reference_Guide-JavaScript_Inter_Application_Communication-Example_of_what">
- <title>Example [of what?]</title>
+ <title>Example of Javascript events usage</title>
<programlisting role="HTML"><%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<portlet:defineObjects/>
16 years, 1 month
gatein SVN: r2244 - portal/trunk/component/common/src/main/java/conf.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-14 06:54:08 -0400 (Sun, 14 Mar 2010)
New Revision: 2244
Modified:
portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties
Log:
Duplicate key
Modified: portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties
===================================================================
--- portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties 2010-03-14 10:53:50 UTC (rev 2243)
+++ portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties 2010-03-14 10:54:08 UTC (rev 2244)
@@ -27,7 +27,6 @@
gatein.jcr.config.type=local
gatein.jcr.datasource.name=java:jdbcjcr
gatein.jcr.datasource.dialect=auto
-gatein.jcr.datasource.url=
gatein.jcr.datasource.driver=org.hsqldb.jdbcDriver
gatein.jcr.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr_${name}
gatein.jcr.datasource.username=sa
16 years, 1 month
gatein SVN: r2243 - in portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui: portal and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-14 06:53:50 -0400 (Sun, 14 Mar 2010)
New Revision: 2243
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
Log:
GTNPORTAL-880: password recovery may change anyone's password
Delete token once used
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2010-03-13 23:41:02 UTC (rev 2242)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2010-03-14 10:53:50 UTC (rev 2243)
@@ -25,6 +25,8 @@
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.security.GateInToken;
+import org.exoplatform.web.security.Token;
+import org.exoplatform.web.security.security.RemindPasswordTokenService;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
@@ -57,7 +59,7 @@
static User user_;
- private static GateInToken token;
+ private static String tokenId;
public UIResetPassword() throws Exception
{
@@ -76,9 +78,9 @@
getUIStringInput(USER_NAME).setValue(user.getUserName());
}
- public void setToken(GateInToken token)
+ public void setTokenId(String tokenId)
{
- UIResetPassword.token = token;
+ UIResetPassword.tokenId = tokenId;
}
@Override
@@ -101,6 +103,8 @@
UIApplication uiApp = request.getUIApplication();
UIMaskWorkspace uiMaskWorkspace = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
OrganizationService orgService = uiForm.getApplicationComponent(OrganizationService.class);
+ RemindPasswordTokenService tokenService = uiForm.getApplicationComponent(RemindPasswordTokenService.class);
+
uiForm.reset();
boolean setPassword = true;
@@ -110,6 +114,7 @@
setPassword = false;
}
+ Token token = tokenService.getToken(tokenId);
// Making sure a token exist
if (token == null || token.isExpired())
{
@@ -125,7 +130,7 @@
uiMaskWorkspace.setWindowSize(-1, -1);
uiApp.addMessage(new ApplicationMessage("UIResetPassword.msg.change-password-successfully", null));
- // Should invalidate the token here...
+ tokenService.deleteToken(tokenId);
}
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-03-13 23:41:02 UTC (rev 2242)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-03-14 10:53:50 UTC (rev 2243)
@@ -457,7 +457,7 @@
UIResetPassword uiReset = uiMaskWS.createUIComponent(UIResetPassword.class, null, null);
uiReset.setUser(user);
- uiReset.setToken(token);
+ uiReset.setTokenId(tokenId);
uiMaskWS.setUIComponent(uiReset);
uiMaskWS.setWindowSize(630, -1);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS);
16 years, 1 month
gatein SVN: r2242 - in portal/trunk: web/portal/src/main/webapp/WEB-INF/conf/mail and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-13 18:41:02 -0500 (Sat, 13 Mar 2010)
New Revision: 2242
Modified:
portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties
portal/trunk/component/common/src/main/java/conf/configuration-tomcat.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/mail/portal-mail-configuration.xml
Log:
GTNPORTAL-883: Extract email information (and remove default GMail account)
Modified: portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties
===================================================================
--- portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties 2010-03-13 23:15:18 UTC (rev 2241)
+++ portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties 2010-03-13 23:41:02 UTC (rev 2242)
@@ -51,4 +51,7 @@
gatein.email.smtp.host=smtp.gmail.com
gatein.email.smtp.port=465
gatein.email.smtp.starttls.enable=true
+gatein.email.smtp.auth=true
+gatein.email.smtp.socketFactory.port=465
+gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
Modified: portal/trunk/component/common/src/main/java/conf/configuration-tomcat.properties
===================================================================
--- portal/trunk/component/common/src/main/java/conf/configuration-tomcat.properties 2010-03-13 23:15:18 UTC (rev 2241)
+++ portal/trunk/component/common/src/main/java/conf/configuration-tomcat.properties 2010-03-13 23:41:02 UTC (rev 2242)
@@ -53,3 +53,6 @@
gatein.email.smtp.host=smtp.gmail.com
gatein.email.smtp.port=465
gatein.email.smtp.starttls.enable=true
+gatein.email.smtp.auth=true
+gatein.email.smtp.socketFactory.port=465
+gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
\ No newline at end of file
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/mail/portal-mail-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/mail/portal-mail-configuration.xml 2010-03-13 23:15:18 UTC (rev 2241)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/mail/portal-mail-configuration.xml 2010-03-13 23:41:02 UTC (rev 2242)
@@ -38,10 +38,10 @@
<property name="mail.smtp.host" value="${gatein.email.smtp.host}" />
<property name="mail.smtp.port" value="${gatein.email.smtp.port}" />
<property name="mail.smtp.starttls.enable" value="${gatein.email.smtp.starttls.enable}" />
- <property name="mail.smtp.auth" value="true" />
+ <property name="mail.smtp.auth" value="${gatein.email.smtp.auth}" />
<property name="mail.smtp.debug" value="false" />
- <property name="mail.smtp.socketFactory.port" value="465" />
- <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLSocketFactory" />
+ <property name="mail.smtp.socketFactory.port" value="${gatein.email.smtp.socketFactory.port}" />
+ <property name="mail.smtp.socketFactory.class" value="${gatein.email.smtp.socketFactory.class}" />
<property name="mail.smtp.socketFactory.fallback" value="false" />
</properties-param>
</init-params>
16 years, 1 month
gatein SVN: r2241 - in portal/trunk/examples: portal/war/src/main/webapp/templates/groovy/webui/component and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-13 18:15:18 -0500 (Sat, 13 Mar 2010)
New Revision: 2241
Modified:
portal/trunk/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
portal/trunk/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
Log:
GTNPORTAL-806: Links on Home page
Add the links also on the extension and sample-portal
Modified: portal/trunk/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
--- portal/trunk/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-03-13 23:15:16 UTC (rev 2240)
+++ portal/trunk/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-03-13 23:15:18 UTC (rev 2241)
@@ -1,17 +1,11 @@
-
<div class="UIHomePagePortlet" id="$uicomponent.id">
<div class="TRContainer">
<div class="PortletDecoration">
- <div class="GuideText">GateIn is the new generation of Open Source portal, jointly led by Red Hat and eXo Platform who partner to gather the best portal experts and communities around a robust and intuitive portal that brings rich administration functionalities to IT systems. <br /> This is the Home Page of the "sample-ext" (skin has changed, new pages, customized resource bundles) :
- <!--ul>
- <li><b><%=_ctx.appRes("UIHomePagePortlet.Label.SampleKey")%></b></li>
- <li><b><%=_ctx.appRes("UIHomePagePortlet.Label.SampleRB.SampleKey")%></b></li>
- </ul-->
- </div>
- <div class="VersionIcon"><span></span></div>
+ <div class="GuideText">GateIn is the new generation of Open Source portal, jointly led by Red Hat and eXo Platform who partner to gather the best portal experts and communities around a robust and intuitive portal that brings rich administration functionalities to IT systems. <br /> This is the Home Page of the "sample-ext" (skin has changed, new pages, customized resource bundles) :</div>
+ <a class="VersionIcon" href="http://www.jboss.org/gatein/" target="_blank"></a>
<div class="DotLine"><span></span></div>
- <div class="GuideText">For more information, please contact us.</div>
- <div class="ContactIcon"><span></span></div>
+ <div class="GuideText"><%=_ctx.appRes("UIHomePagePortlet.Label.GuideText")%></div>
+ <a class="ContactIcon" href="http://community.jboss.org/en/gatein?view=discussions" target="_blank"></a>
</div>
</div>
@@ -34,7 +28,7 @@
<div class="AccountsContainerDeco">
<div class="AccountBlock AdministratorUser">
<div class="AccountInfos">
- <div class="AccountTitle">Administrator</div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
<div class="ClearBoth"><span></span></div>
@@ -48,7 +42,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock ManagerUser">
<div class="AccountInfos">
- <div class="AccountTitle">Manager</div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
<div class="ClearBoth"><span></span></div>
@@ -62,7 +56,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock NormalUser">
<div class="AccountInfos">
- <div class="AccountTitle">User</div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
<div class="ClearBoth"><span></span></div>
@@ -76,7 +70,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock DemoUser" style="margin-right: 0px;">
<div class="AccountInfos">
- <div class="AccountTitle">Demo</div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
<div class="ClearBoth"><span></span></div>
Modified: portal/trunk/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
--- portal/trunk/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-03-13 23:15:16 UTC (rev 2240)
+++ portal/trunk/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-03-13 23:15:18 UTC (rev 2241)
@@ -1,4 +1,3 @@
-
<div class="UIHomePagePortlet" id="$uicomponent.id">
<div class="TRContainer">
<div class="PortletDecoration">
@@ -8,10 +7,10 @@
<li><b><%=_ctx.appRes("UIHomePagePortlet.Label.SampleRB.SampleKey")%></b></li>
</ul>
</div>
- <div class="VersionIcon"><span></span></div>
+ <a class="VersionIcon" href="http://www.jboss.org/gatein/" target="_blank"></a>
<div class="DotLine"><span></span></div>
- <div class="GuideText">For more information, please contact us.</div>
- <div class="ContactIcon"><span></span></div>
+ <div class="GuideText"><%=_ctx.appRes("UIHomePagePortlet.Label.GuideText")%></div>
+ <a class="ContactIcon" href="http://community.jboss.org/en/gatein?view=discussions" target="_blank"></a>
</div>
</div>
@@ -21,7 +20,7 @@
<div class="HomePortletAdBackround">
<div class="AdImageLeft">
<div class="AdImageRight">
- <div class="EmptyBlock"><span></span></div>
+ <div class="EmptyBlock"><%=_ctx.appRes("UIHomePagePortlet.Label.Slogan")%></div>
</div>
</div>
</div>
@@ -30,12 +29,11 @@
<div class="LeftAccountsContainer">
<div class="RightAccountsContainer">
<div class="MiddleAccountsContainer">
- <div class="InstructionTitle">Try GateIn 3.0 with one of these user accounts
- </div>
+ <div class="InstructionTitle"><%=_ctx.appRes("UIHomePagePortlet.Label.Title")%></div>
<div class="AccountsContainerDeco">
<div class="AccountBlock AdministratorUser">
<div class="AccountInfos">
- <div class="AccountTitle">Administrator</div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
<div class="ClearBoth"><span></span></div>
@@ -49,7 +47,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock ManagerUser">
<div class="AccountInfos">
- <div class="AccountTitle">Manager</div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
<div class="ClearBoth"><span></span></div>
@@ -63,7 +61,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock NormalUser">
<div class="AccountInfos">
- <div class="AccountTitle">User</div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
<div class="ClearBoth"><span></span></div>
@@ -77,7 +75,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock DemoUser" style="margin-right: 0px;">
<div class="AccountInfos">
- <div class="AccountTitle">Demo</div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
<div class="ClearBoth"><span></span></div>
16 years, 1 month
gatein SVN: r2240 - in portal/trunk: web/portal/src/main/webapp and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-03-13 18:15:16 -0500 (Sat, 13 Mar 2010)
New Revision: 2240
Modified:
portal/trunk/examples/portal/war/src/main/webapp/favicon.ico
portal/trunk/web/portal/src/main/webapp/favicon.ico
Log:
better favicon (transparent background)
Modified: portal/trunk/examples/portal/war/src/main/webapp/favicon.ico
===================================================================
(Binary files differ)
Modified: portal/trunk/web/portal/src/main/webapp/favicon.ico
===================================================================
(Binary files differ)
16 years, 1 month
gatein SVN: r2239 - in portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui: portal and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-13 17:20:23 -0500 (Sat, 13 Mar 2010)
New Revision: 2239
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
Log:
GTNPORTAL-880: password recovery may change anyone's password
Fix a potential security hole
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2010-03-13 21:24:19 UTC (rev 2238)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIResetPassword.java 2010-03-13 22:20:23 UTC (rev 2239)
@@ -57,6 +57,8 @@
static User user_;
+ private static GateInToken token;
+
public UIResetPassword() throws Exception
{
addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).setEditable(false));
@@ -74,6 +76,11 @@
getUIStringInput(USER_NAME).setValue(user.getUserName());
}
+ public void setToken(GateInToken token)
+ {
+ UIResetPassword.token = token;
+ }
+
@Override
public void reset()
{
@@ -95,23 +102,33 @@
UIMaskWorkspace uiMaskWorkspace = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
OrganizationService orgService = uiForm.getApplicationComponent(OrganizationService.class);
uiForm.reset();
- boolean isNew = true;
+ boolean setPassword = true;
if (!newpassword.equals(confirmnewpassword))
{
uiApp.addMessage(new ApplicationMessage("UIResetPassword.msg.password-is-not-match", null));
- isNew = false;
+ setPassword = false;
}
-
- if (isNew)
+
+ // Making sure a token exist
+ if (token == null || token.isExpired())
{
+ uiApp.addMessage(new ApplicationMessage("UIForgetPassword.msg.expration", null));
+ setPassword = false;
+ }
+
+ if (setPassword)
+ {
user_.setPassword(newpassword);
orgService.getUserHandler().saveUser(user_, true);
uiMaskWorkspace.setUIComponent(null);
uiMaskWorkspace.setWindowSize(-1, -1);
uiApp.addMessage(new ApplicationMessage("UIResetPassword.msg.change-password-successfully", null));
+
+ // Should invalidate the token here...
}
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
}
}
+
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-03-13 21:24:19 UTC (rev 2238)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-03-13 22:20:23 UTC (rev 2239)
@@ -457,6 +457,7 @@
UIResetPassword uiReset = uiMaskWS.createUIComponent(UIResetPassword.class, null, null);
uiReset.setUser(user);
+ uiReset.setToken(token);
uiMaskWS.setUIComponent(uiReset);
uiMaskWS.setWindowSize(630, -1);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS);
16 years, 1 month
gatein SVN: r2238 - in portal/trunk: webui/portal/src/main/java/org/exoplatform/portal/webui/login and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-13 16:24:19 -0500 (Sat, 13 Mar 2010)
New Revision: 2238
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/security/security/RemindPasswordTokenService.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
Log:
GTNPORTAL-880: password recovery may change anyone's password
+ Fix: remember my username
+ Handle case when token expired
Modified: portal/trunk/component/web/src/main/java/org/exoplatform/web/security/security/RemindPasswordTokenService.java
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/security/security/RemindPasswordTokenService.java 2010-03-13 20:36:19 UTC (rev 2237)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/security/security/RemindPasswordTokenService.java 2010-03-13 21:24:19 UTC (rev 2238)
@@ -1,3 +1,25 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2010, 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.exoplatform.web.security.security;
import org.exoplatform.commons.chromattic.ChromatticManager;
@@ -3,16 +25,20 @@
import org.exoplatform.container.xml.InitParams;
+/**
+ * @author <a href="mailto:theute@redhat.com">Thomas Heute</a>
+ * @version $Revision$
+ */
public class RemindPasswordTokenService extends CookieTokenService {
- public RemindPasswordTokenService(InitParams initParams,
- ChromatticManager chromatticManager) {
-
- super(initParams, chromatticManager);
- }
+ public RemindPasswordTokenService(InitParams initParams,
+ ChromatticManager chromatticManager)
+ {
+ super(initParams, chromatticManager);
+ }
- protected String nextTokenId()
- {
- return "" + random.nextInt();
- }
-
+ @Override
+ protected String nextTokenId()
+ {
+ return "" + random.nextInt();
+ }
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java 2010-03-13 20:36:19 UTC (rev 2237)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java 2010-03-13 21:24:19 UTC (rev 2238)
@@ -42,7 +42,6 @@
import org.exoplatform.webui.form.validator.MandatoryValidator;
import java.net.URLEncoder;
-import java.util.Date;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -82,15 +81,11 @@
String userName = uiForm.getUIStringInput(Username).getValue();
String email = uiForm.getUIStringInput(Email).getValue();
uiForm.reset();
-
- RemindPasswordTokenService tokenService = uiForm.getApplicationComponent(RemindPasswordTokenService.class);
+
+ User user = null;
- Credentials credentials = new Credentials(userName, "");
- String tokenId = tokenService.createToken(credentials);
+ String tokenId = null;
-
- User user = null;
-
// User provided his username
if (userName != null)
{
@@ -109,17 +104,13 @@
Query query = new Query();
// Querying on email won't work. PLIDM-12
// Note that querying on email is inefficient as it loops over all users...
- // query.setEmail(email);
+ query.setEmail(email);
PageList<User> users = orgSrc.getUserHandler().findUsers(query);
- for (User tmpUser : users.currentPage().toArray(new User[]{}))
+ if (users.getAll().size() > 0)
{
- if (email.equals(tmpUser.getEmail()))
- {
- user = tmpUser;
- break;
- }
+ user = users.getAll().get(0);
}
- if (user == null)
+ else
{
requestContext.getUIApplication().addMessage(
new ApplicationMessage("UIForgetPassword.msg.email-not-exist", null));
@@ -128,7 +119,12 @@
}
email = user.getEmail();
-
+
+ // Create token
+ RemindPasswordTokenService tokenService = uiForm.getApplicationComponent(RemindPasswordTokenService.class);
+ Credentials credentials = new Credentials(user.getUserName(), "");
+ tokenId = tokenService.createToken(credentials);
+
String portalName = URLEncoder.encode(Util.getUIPortal().getName(), "UTF-8");
ResourceBundle res = requestContext.getApplicationResourceBundle();
@@ -146,14 +142,13 @@
e.printStackTrace();
}
String host = url.substring(0, url.indexOf(requestContext.getRequestContextPath()));
- Long now = new Date().getTime();
- String activeLink = host + requestContext.getRequestContextPath() + "/public/" + portalName;
- activeLink +=
- "?portal:componentId=UIPortal&portal:action=RecoveryPasswordAndUsername&tokenId=" + tokenId;
- activeLink = headerMail + activeLink + footerMail;
+ String activeLink = host + requestContext.getRequestContextPath() + "/public/" + portalName
+ + "?portal:componentId=UIPortal&portal:action=RecoveryPasswordAndUsername&tokenId="
+ + tokenId;
+ String mailText = headerMail + "\n" + activeLink + footerMail;
try
{
- mailSrc.sendMessage(res.getString("UIForgetPassword.mail.from"), email, res.getString("UIForgetPassword.mail.subject"), activeLink);
+ mailSrc.sendMessage(res.getString("UIForgetPassword.mail.from"), email, res.getString("UIForgetPassword.mail.subject"), mailText);
}
catch(Exception e)
{
@@ -164,10 +159,6 @@
return;
}
- // Don't save the new password if we couldn't send the email
-// user.setPassword(newPassword);
- orgSrc.getUserHandler().saveUser(user, true);
-
uilogin.getChild(UILoginForm.class).setRendered(true);
uilogin.getChild(UIForgetPasswordWizard.class).setRendered(false);
uilogin.getChild(UIForgetPassword.class).setRendered(false);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-03-13 20:36:19 UTC (rev 2237)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2010-03-13 21:24:19 UTC (rev 2238)
@@ -50,6 +50,7 @@
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.web.security.GateInToken;
import org.exoplatform.web.security.security.RemindPasswordTokenService;
+import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIContainer;
import org.exoplatform.webui.core.UITabPane;
@@ -438,6 +439,14 @@
String tokenId = event.getRequestContext().getRequestParameter("tokenId");
GateInToken token = tokenService.getToken(tokenId);
+ if (token == null)
+ {
+ WebuiRequestContext requestContext = event.getRequestContext();
+ requestContext.getUIApplication().addMessage(
+ new ApplicationMessage("UIForgetPassword.msg.expration", null));
+ requestContext.addUIComponentToUpdateByAjax(uiPortal.getParent());
+ return;
+ }
UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
16 years, 1 month
gatein SVN: r2237 - portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-03-13 15:36:19 -0500 (Sat, 13 Mar 2010)
New Revision: 2237
Added:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js
Log:
GTNPORTAL-878: No french translation for MessageResource
- Translated in French the expected user facing message
- Copied the english files for all other missing language to avoid the reported error by browsers
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ar.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_es.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_fr.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "La session a expir\u00e9 ! Veuillez recharger la page.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ja.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ko.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_ne.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_nl.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_uk.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
Added: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js (rev 0)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/i18n/MessageResource_zh_TW.js 2010-03-13 20:36:19 UTC (rev 2237)
@@ -0,0 +1,22 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.
+ */
+
+eXo.i18n.I18NMessage.SessionTimeout = "Session timeout ! Refresh your browser.";
+eXo.i18n.I18NMessage.TargetBlockNotFound = "The target blockId to update is not found : {0}";
+eXo.i18n.I18NMessage.BlockUpdateNotFound = "The blockId to update is not found : {0}";
16 years, 1 month