Author: emuckenhuber
Date: 2007-08-21 12:55:37 -0400 (Tue, 21 Aug 2007)
New Revision: 8017
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTestCase.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CaptchaValidator.java
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/resetPassword.xhtml
Removed:
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java
Modified:
trunk/core-identity/.classpath
trunk/core-identity/build.xml
trunk/core-identity/src/etc/
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityCommandFactoryService.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity.properties
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/index.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/register.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/userTemplate.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/profile.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/index.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lostTemplate.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/register.xhtml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/web.xml
Log:
added jcaptcha to verify the registration process
modifcation of "edit profile" in the user management
Modified: trunk/core-identity/.classpath
===================================================================
--- trunk/core-identity/.classpath 2007-08-21 16:35:48 UTC (rev 8016)
+++ trunk/core-identity/.classpath 2007-08-21 16:55:37 UTC (rev 8017)
@@ -50,5 +50,6 @@
<classpathentry kind="lib"
path="/thirdparty/jbossas/core-libs/lib/jnp-client.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jbossas/core-libs/lib/jnpserver.jar"/>
<classpathentry kind="lib"
path="/thirdparty/jbossas/core-libs/lib/namespace.jar"/>
+ <classpathentry kind="lib"
path="/thirdparty/jcaptcha/lib/jcaptcha.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/core-identity/build.xml
===================================================================
--- trunk/core-identity/build.xml 2007-08-21 16:35:48 UTC (rev 8016)
+++ trunk/core-identity/build.xml 2007-08-21 16:55:37 UTC (rev 8017)
@@ -97,6 +97,7 @@
<path refid="apache.log4j.classpath"/>
<path refid="sun.servlet.classpath"/>
<path refid="facelets.facelets.classpath"/>
+ <path refid="jcaptcha.jcaptcha.classpath"/>
<path refid="el.el.classpath"/>
<path refid="jakarta.cactus.classpath"/>
<path refid="junit.junit.classpath"/>
@@ -220,6 +221,7 @@
<copy todir="${build.resources}/portal-identity.sar/lib">
<fileset dir="${build.lib}"
includes="portal-core-identity-services-lib.jar" />
<fileset dir="${jboss.portal-faces.root}/lib"
includes="portal-faces-loader-lib.jar"/>
+ <fileset dir="${jcaptcha.jcaptcha.root}/lib"
includes="jcaptcha.jar"/>
</copy>
<copy
todir="${build.resources}/portal-identity.sar/portal-identity.war">
Property changes on: trunk/core-identity/src/etc
___________________________________________________________________
Name: svn:ignore
+ ui.xsd
ui.xml
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityCommandFactoryService.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityCommandFactoryService.java 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/services/IdentityCommandFactoryService.java 2007-08-21
16:55:37 UTC (rev 8017)
@@ -112,7 +112,7 @@
int aLength = aRequest.length;
// Values: action / userId / hash / default / default /
IdentityUserPorletWindow
- if (aLength > 5)
+ if (aLength > 2)
{
// TODO - UTF-8 decode
String action = aRequest[0];
Deleted:
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java 2007-08-21
16:55:37 UTC (rev 8017)
@@ -1,327 +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.jboss.portal.core.identity.test.validators;
-
-import javax.faces.validator.ValidatorException;
-
-import org.jboss.portal.core.identity.ui.validators.EmailValidator;
-
-import junit.framework.TestCase;
-
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
- * @version $Revision$
- */
-public class EmailValidatorTest extends TestCase
-{
- public void test01()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "12.blah(a)foo.com");
- }
- catch(ValidatorException e)
- {
- fail("12.blah(a)foo.com should be valid");
- }
- }
-
- public void test02()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "12.blah@");
- fail("12.blah@ should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test03()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "@blah");
- fail("@blah should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test04()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "(a)blah.com");
- fail("(a)blah.com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test05()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user.name(a)email.info");
- }
- catch(ValidatorException e)
- {
- fail("user.name(a)email.info should be valid");
- }
- }
-
- public void test06()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user_name(a)email.org");
- }
- catch(ValidatorException e)
- {
- fail("user_name(a)email.org should be valid");
- }
- }
-
- public void test07()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "e*mail(a)email.com");
- fail("e*mail(a)email.com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test08()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "*(a)blah.com");
- fail("*@blah should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test09()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user@.com");
- fail("user@.com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test10()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user(a)a\\.com");
- fail("user(a)a\\.com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test11()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user@abc-com");
- fail("user@abc-com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test12()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "us/er(a)a.com");
- fail("us/er(a)a.com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test13()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user@ab)com");
- fail("user@ab)com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test14()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user@ab/com");
- fail("user@ab/com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test15()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user@abc_com");
- fail("user@abc_com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test16()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user@a*com");
- fail("user@a*com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test17()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user(a)w-h.com");
- }
- catch(ValidatorException e)
- {
- fail("user(a)w-h.com should be valid");
- }
- }
-
- public void test18()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user@abc..com");
- fail("user@abc..com should not be valid");
- }
- catch(ValidatorException e)
- {
-
- }
- }
-
- public void test19()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user@.abc.com");
- fail("user@.abc.com should be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test20()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "(a)blah.com");
- fail("(a)blah.com should not be valid");
- }
- catch(ValidatorException e)
- {
- // Success
- }
- }
-
- public void test21()
- {
- EmailValidator emailValidator = new EmailValidator();
- try
- {
- emailValidator.validate(null, null, "user(a)ab.museum");
- }
- catch(ValidatorException e)
- {
- fail("user(a)ab.museum should not be valid");
- }
- }
-
-}
-
Copied:
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTestCase.java
(from rev 7984,
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTest.java)
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTestCase.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/test/validators/EmailValidatorTestCase.java 2007-08-21
16:55:37 UTC (rev 8017)
@@ -0,0 +1,327 @@
+/******************************************************************************
+ * 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.jboss.portal.core.identity.test.validators;
+
+import javax.faces.validator.ValidatorException;
+
+import org.jboss.portal.core.identity.ui.validators.EmailValidator;
+
+import junit.framework.TestCase;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class EmailValidatorTestCase extends TestCase
+{
+ public void test01()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "12.blah(a)foo.com");
+ }
+ catch(ValidatorException e)
+ {
+ fail("12.blah(a)foo.com should be valid");
+ }
+ }
+
+ public void test02()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "12.blah@");
+ fail("12.blah@ should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test03()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "@blah");
+ fail("@blah should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test04()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "(a)blah.com");
+ fail("(a)blah.com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test05()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user.name(a)email.info");
+ }
+ catch(ValidatorException e)
+ {
+ fail("user.name(a)email.info should be valid");
+ }
+ }
+
+ public void test06()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user_name(a)email.org");
+ }
+ catch(ValidatorException e)
+ {
+ fail("user_name(a)email.org should be valid");
+ }
+ }
+
+ public void test07()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "e*mail(a)email.com");
+ fail("e*mail(a)email.com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test08()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "*(a)blah.com");
+ fail("*@blah should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test09()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user@.com");
+ fail("user@.com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test10()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user(a)a\\.com");
+ fail("user(a)a\\.com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test11()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user@abc-com");
+ fail("user@abc-com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test12()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "us/er(a)a.com");
+ fail("us/er(a)a.com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test13()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user@ab)com");
+ fail("user@ab)com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test14()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user@ab/com");
+ fail("user@ab/com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test15()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user@abc_com");
+ fail("user@abc_com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test16()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user@a*com");
+ fail("user@a*com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test17()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user(a)w-h.com");
+ }
+ catch(ValidatorException e)
+ {
+ fail("user(a)w-h.com should be valid");
+ }
+ }
+
+ public void test18()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user@abc..com");
+ fail("user@abc..com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+
+ }
+ }
+
+ public void test19()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user@.abc.com");
+ fail("user@.abc.com should be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test20()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "(a)blah.com");
+ fail("(a)blah.com should not be valid");
+ }
+ catch(ValidatorException e)
+ {
+ // Success
+ }
+ }
+
+ public void test21()
+ {
+ EmailValidator emailValidator = new EmailValidator();
+ try
+ {
+ emailValidator.validate(null, null, "user(a)ab.museum");
+ }
+ catch(ValidatorException e)
+ {
+ fail("user(a)ab.museum should not be valid");
+ }
+ }
+
+}
+
Property changes on: trunk/core-identity/src/main/org/jboss/portal/core/identity/ui
___________________________________________________________________
Name: svn:ignore
+ faces
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateUserAction.java 2007-08-21
16:55:37 UTC (rev 8017)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.core.identity.ui.actions;
+import java.awt.image.BufferedImage;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.ArrayList;
@@ -36,6 +37,7 @@
import javax.faces.context.FacesContext;
import org.jboss.logging.Logger;
+import org.jboss.portal.core.identity.services.captcha.JCaptchaService;
import org.jboss.portal.core.identity.ui.IdentityConstants;
import org.jboss.portal.core.identity.ui.IdentityUIUser;
import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
@@ -63,7 +65,7 @@
/** . */
private SendMailBean sendMailBean;
-
+
/** .*/
private String subscriptionMode;
@@ -119,7 +121,7 @@
{
this.sendMailBean = sendMailBean;
}
-
+
public String register()
{
if (uiUser.getUsername() != null && uiUser.getPassword() != null)
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditProfileAction.java 2007-08-21
16:55:37 UTC (rev 8017)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.identity.ui.actions;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
import java.util.HashMap;
import java.util.Map;
@@ -32,7 +30,6 @@
import javax.faces.context.FacesContext;
import org.jboss.logging.Logger;
-import org.jboss.portal.common.util.Tools;
import org.jboss.portal.core.identity.ui.IdentityConstants;
import org.jboss.portal.core.identity.ui.IdentityUIUser;
import org.jboss.portal.core.identity.ui.common.IdentityUserBean;
@@ -156,6 +153,20 @@
{
try
{
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ String checkUser = ectx.getRemoteUser();
+ // Checking if password needs to updated
+ // TODO get Metadata required length
+ if (uiUser.getPassword() != null && uiUser.getPassword().trim().length()
> 6 )
+ {
+ log.error("hilffe - update -"+ uiUser.getPassword());
+ }
+ else
+ {
+ log.error("hilffe - " + checkUser);
+ }
+
User user = identityUserBean.findUserByUserName(this.currentUser);
// Adding dynamically set properties
identityUserBean.updateProfile(user,
uiUser.getAttribute().getProfileAttributes());
@@ -172,7 +183,7 @@
}
return "editProfile";
}
-
+
public String changePassword()
{
if (this.password != null)
@@ -191,7 +202,7 @@
}
return "start";
}
-
+
public String changeEmail()
{
String subscriptionMode =
FacesContext.getCurrentInstance().getExternalContext().getInitParameter(
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/LostPasswordAction.java 2007-08-21
16:55:37 UTC (rev 8017)
@@ -28,6 +28,7 @@
import java.util.Map;
import javax.faces.application.FacesMessage;
+import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@@ -125,11 +126,20 @@
{
this.passwordCharacters = passwordCharacters;
}
-
+
public String doomed()
{
User user = null;
+ // Used by the user management to reset passwords
+ if (username == null )
+ {
+ FacesContext ctx = FacesContext.getCurrentInstance();
+ ExternalContext ectx = ctx.getExternalContext();
+ Map params = ectx.getRequestParameterMap();
+ this.username = (String) params.get("currentUser");
+ }
+
if (username != null && !username.equals(""))
{
try
Added:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CaptchaValidator.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CaptchaValidator.java
(rev 0)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/CaptchaValidator.java 2007-08-21
16:55:37 UTC (rev 8017)
@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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.jboss.portal.core.identity.ui.validators;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+import javax.portlet.PortletRequest;
+
+import org.jboss.portal.core.identity.services.captcha.JCaptchaService;
+
+/**
+ * @author <a href="mailto:emuckenh@redhat.com">Emanuel
Muckenhuber</a>
+ * @version $Revision$
+ */
+public class CaptchaValidator implements Validator
+{
+ public void validate(FacesContext context, UIComponent component, Object value) throws
ValidatorException
+ {
+ Boolean tester = Boolean.FALSE;
+ PortletRequest portletRequest = (PortletRequest)
context.getExternalContext().getRequest();
+ String captchaId = portletRequest.getRequestedSessionId();
+ try
+ {
+ tester = JCaptchaService.getInstance().validateResponseForID(captchaId, (String)
value);
+ }
+ catch (Exception e)
+ {
+ throw new ValidatorException(new FacesMessage("Error while
validating."));
+ }
+ if ( tester.equals(Boolean.FALSE))
+ {
+ throw new ValidatorException(new FacesMessage("captcha incorrect."));
+ }
+ }
+}
\ No newline at end of file
Modified:
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java
===================================================================
---
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/PasswordValidator.java 2007-08-21
16:55:37 UTC (rev 8017)
@@ -42,7 +42,7 @@
{
String password = (String) ((HtmlInputSecret) passwordComponent).getValue();
- if (!password.equals((String) value))
+ if (value == null || !password.equals((String) value))
{
throw new ValidatorException(new FacesMessage("The passwords don't
match."));
}
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity.properties
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity.properties 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/classes/Identity.properties 2007-08-21
16:55:37 UTC (rev 8017)
@@ -90,6 +90,11 @@
IDENTITY_MANAGEMENT_CREATE_ROLE=Create new role
IDENTITY_MANAGEMENT_EDIT_ROLE=Edit role
IDENTITY_MANAGEMENT_CREATE_ROLE=Create role
+IDENTITY_MANAGEMENT_DISABLE=Disable
+IDENTITY_MANAGEMENT_ENABLE=Enable
+IDENTITY_MANAGEMENT_RESET_PASSWORD=Reset password
+IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION=The user will get a random password sent
by email.
+IDENTITY_REGISTER_VERIFY_CAPTCHA=Verify captcha
IDENTITY_REGISTER_TITLE_CONFIRM_DELETE=Confirmation: Delete Object
IDENTITY_REGISTER_CONFIRMATIONEMAIL=Confirm your subscription
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -28,7 +28,10 @@
<faces-config>
<application>
- <property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver>
+
<variable-resolver>org.jboss.portal.core.identity.ui.faces.JBossPortletVariableResolver</variable-resolver>
+ <property-resolver>org.jboss.portal.core.identity.ui.faces.JBossPortletPropertyResolver</property-resolver>
+<!--
<property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver>
+ -->
<view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler>
</application>
@@ -222,6 +225,10 @@
<validator-id>CurrentPasswordValidator</validator-id>
<validator-class>org.jboss.portal.core.identity.ui.validators.CurrentPasswordValidator</validator-class>
</validator>
+ <validator>
+ <validator-id>CaptchaValidator</validator-id>
+
<validator-class>org.jboss.portal.core.identity.ui.validators.CaptchaValidator</validator-class>
+ </validator>
<navigation-rule>
<navigation-case>
@@ -395,6 +402,25 @@
<to-view-id>/WEB-INF/jsf/admin/roles/deleteRole.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <from-view-id>/WEB-INF/jsf/admin/editProfile.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>resetPassword</from-outcome>
+
<to-view-id>/WEB-INF/jsf/admin/user/resetPassword.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+
<from-view-id>/WEB-INF/jsf/admin/user/resetPassword.xhtml</from-view-id>
+ <navigation-case>
+ <from-action>#{lostpasswordmgr.doomed}</from-action>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/WEB-INF/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-action>#{lostpasswordmgr.doomed}</from-action>
+ <from-outcome>lostPassword</from-outcome>
+ <to-view-id>/WEB-INF/jsf/admin/editProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
-
</faces-config>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/editProfile.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -14,6 +14,7 @@
<ui:decorate template="/WEB-INF/jsf/common/profile.xhtml">
<ui:param name="manager" value="#{editprofilemgr}"/>
+ <ui:param name="adminMode" value="true"/>
</ui:decorate>
</ui:define>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/index.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/index.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/index.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -48,11 +48,6 @@
<h:outputText value="#{bundle.IDENTITY_ENABLED}"/>
</f:facet>
<h:selectBooleanCheckbox id="enabled"
value="#{uiUser.attribute.enabled}" disabled="true" />
- <h:commandLink action="#{useradministrationbean.enableUser}">
- <h:outputText value="#{uiUser.attribute.enabled == true ? 'disable' :
'enable'}" />
- <f:param name="currentUser" value="#{uiUser.username}"/>
- <f:param name="enableAction" value="#{uiUser.attribute.enabled ==
true ? 'disable' : 'enable'}" />
- </h:commandLink>
</h:column>
<h:column>
<f:facet name="header">
@@ -66,6 +61,11 @@
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ACTION_ROLES}"/>
<f:param name="currentUser" value="#{uiUser.username}"/>
</h:commandLink> |
+ <h:commandLink action="#{useradministrationbean.enableUser}">
+ <h:outputText value="#{uiUser.attribute.enabled == true ?
bundle.IDENTITY_MANAGEMENT_DISABLE : bundle.IDENTITY_MANAGEMENT_ENABLE}" />
+ <f:param name="currentUser" value="#{uiUser.username}"/>
+ <f:param name="enableAction" value="#{uiUser.attribute.enabled ==
true ? 'disable' : 'enable'}" />
+ </h:commandLink> |
<h:commandLink action="#{useradministrationbean.deleteUser}">
<h:outputText
value="#{bundle.IDENTITY_MANAGEMENT_ACTION_DELETE}"/>
<f:param name="currentUser" value="#{uiUser.username}"/>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/register.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/register.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/register.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -16,6 +16,7 @@
<ui:decorate template="/WEB-INF/jsf/common/register.xhtml">
<ui:param name="manager" value="#{userregistermgr}"/>
+ <ui:param name="showCaptcha" value="false" />
</ui:decorate>
</ui:define>
Added:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/resetPassword.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/resetPassword.xhtml
(rev 0)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/resetPassword.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -0,0 +1,27 @@
+<div
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="identity-ui">
+
+<ui:composition template="/WEB-INF/jsf/admin/user/userTemplate.xhtml">
+
+<ui:define name="title">
+ reset password for user #{editprofilemgr.uiUser.username}
+</ui:define>
+
+<ui:define name="content">
+ <h:form>
+ <p><h:outputText
value="#{bundle.IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION}"
/></p>
+ <hr/>
+ <h:commandLink action="#{lostpasswordmgr.doomed}">
+ <h:outputText value="#{bundle.IDENTITY_BUTTON_SUBMIT}" />
+ <f:param name="currentUser"
value="#{editprofilemgr.uiUser.username}" />
+ </h:commandLink>
+
+ </h:form>
+</ui:define>
+</ui:composition>
+</div>
\ No newline at end of file
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/userTemplate.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/userTemplate.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/admin/user/userTemplate.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -18,7 +18,7 @@
</h:form>
<!-- Status message -->
- <h:messages infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+ <h:message infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
<!-- Title -->
<h4><ui:insert name="title">Title</ui:insert></h4>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/profile.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/profile.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/profile.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -6,19 +6,43 @@
xmlns:c="http://java.sun.com/jstl/core"
class="identity-ui">
- <h:panelGrid columns="2">
- <h:outputText for="username"
value="#{bundle.IDENTITY_USERNAME}"/>
- <h:outputText id="username"
value="#{manager.uiUser.username}"/>
-
- <h:outputText for="email" value="#{bundle.IDENTITY_EMAIL}"/>
- <h:outputText id="email"
value="#{manager.uiUser.attribute.email}"/>
- </h:panelGrid>
+<h:form>
+ <c:choose>
+ <c:when test="#{adminMode == true}">
+ <h:panelGrid columns="3">
+ <h:outputText value="#{bundle.IDENTITY_USERNAME}"/>
+ <h:outputText id="username"
value="#{manager.uiUser.username}"/>
+ <h:message for="username"/>
+
+ <h:outputText for="#{metadataservice.email.name}"
value="#{bundle.IDENTITY_EMAIL}"/>
+ <h:inputText id="#{metadataservice.email.name}"
value="#{manager.uiUser.attribute.email}"
required="#{metadataservice.email.required}">
+ <f:validator validatorId="#{metadataservice.email.validator}"/>
+ </h:inputText>
+ <h:message for="#{metadataservice.email.name}"/>
+
+ <h:outputText value="#{bundle.IDENTITY_PASSWORD}"/>
+ <h:commandLink action="resetPassword">
+ <h:outputText value="#{bundle.IDENTITY_MANAGEMENT_RESET_PASSWORD}"
/>
+ <f:param name="currentUser" value="#{manager.uiUser.username}"
/>
+ </h:commandLink>
+ <h:message for="password"/>
+ </h:panelGrid>
+ </c:when>
+ <c:otherwise>
+ <h:panelGrid columns="2">
+ <h:outputText for="username"
value="#{bundle.IDENTITY_USERNAME}"/>
+ <h:outputText id="username"
value="#{manager.uiUser.username}"/>
+
+ <h:outputText for="email"
value="#{bundle.IDENTITY_EMAIL}"/>
+ <h:outputText id="email"
value="#{manager.uiUser.attribute.email}"/>
+ </h:panelGrid>
+ </c:otherwise>
+ </c:choose>
<ul class="topnav">
<li id="currentTab">Personal Information</li>
</ul>
- <h:form>
<h:panelGrid columns="3" cellpadding="3">
<h:outputText for="givenname"
value="#{bundle.IDENTITY_GIVENNAME}"/>
<h:inputText id="givenname"
value="#{manager.uiUser.attribute.givenname}"/>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/common/register.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -26,13 +26,22 @@
<f:validateLength minimum="6"/>
</h:inputSecret>
<h:message for="password"/>
-
<h:outputText for="passwordCheck"
value="#{bundle.IDENTITY_REGISTER_PASSWORD_CONFIRM}"/>
<h:inputSecret id="passwordCheck" required="true">
<f:validator validatorId="PasswordValidator"/>
</h:inputSecret>
<h:message for="passwordCheck"/>
</h:panelGrid>
+ <c:if test="#{showCaptcha == true}">
+ <h:graphicImage id="captchaimage" url="/jcaptcha" />
+ <h:panelGrid columns="3">
+ <h:outputText value="#{bundle.IDENTITY_REGISTER_VERIFY_CAPTCHA}" />
+ <h:inputText id="validateCaptcha" value=""
required="true">
+ <f:validator validatorId="CaptchaValidator" />
+ </h:inputText>
+ <h:message for="validateCaptcha" />
+ </h:panelGrid>
+ </c:if>
<hr/>
<h:commandButton id="submit" action="register"
value="#{bundle.IDENTITY_BUTTON_SUBMIT}"
styleClass="portlet-form-button"/>
</h:form>
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/index.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/index.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/index.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -5,6 +5,8 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core">
+
+#{portletPreferenceValues}
<c:choose>
<c:when test="#{facesContext.externalContext.remoteUser != null}">
<ui:include src="/WEB-INF/jsf/profile/viewProfile.xhtml"/>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lost.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -19,6 +19,14 @@
<h:inputText id="username" value="#{lostpasswordmgr.username}"
/>
<h:message for="username" />
</h:panelGrid>
+ <h:graphicImage id="captchaimage" url="/jcaptcha" />
+ <h:panelGrid columns="3">
+ <h:outputText value="#{bundle.IDENTITY_REGISTER_VERIFY_CAPTCHA}" />
+ <h:inputText id="validateCaptcha" value=""
required="true">
+ <f:validator validatorId="CaptchaValidator" />
+ </h:inputText>
+ <h:message for="validateCaptcha" />
+ </h:panelGrid>
<hr/>
<h:commandButton value="#{bundle.IDENTITY_BUTTON_SUBMIT}"
action="#{lostpasswordmgr.doomed}"
styleClass="portlet-form-button"/>
</h:form>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lostTemplate.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lostTemplate.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/lostPassword/lostTemplate.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -23,7 +23,7 @@
</h:form>
<!-- Status message -->
- <h:messages infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
+ <h:message infoClass="portlet-msg-success"
errorClass="portlet-msg-error" fatalClass="portlet-msg-error"
warnClass="portlet-msg-alert"/>
<!-- Title -->
<h4><ui:insert name="title">Title</ui:insert></h4>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/profile/editProfile.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -25,6 +25,7 @@
<ui:decorate template="/WEB-INF/jsf/common/profile.xhtml">
<ui:param name="manager" value="#{editprofilemgr}"/>
+ <ui:param name="adminMode" value="false" />
</ui:decorate>
Modified:
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/register.xhtml
===================================================================
---
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/register.xhtml 2007-08-21
16:35:48 UTC (rev 8016)
+++
trunk/core-identity/src/resources/portal-identity-war/WEB-INF/jsf/register/register.xhtml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -16,6 +16,7 @@
<ui:decorate template="/WEB-INF/jsf/common/register.xhtml">
<ui:param name="manager" value="#{userregistermgr}"/>
+ <ui:param name="showCaptcha" value="true"/>
</ui:decorate>
</ui:define>
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2007-08-21
16:35:48 UTC (rev 8016)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/portlet.xml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -51,6 +51,10 @@
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>EDIT</portlet-mode>
+ </supports>
<portlet-info>
<title>User portlet</title>
<keywords>management,user</keywords>
@@ -80,6 +84,10 @@
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>EDIT</portlet-mode>
+ </supports>
<portlet-info>
<title>User management portlet</title>
<keywords>management,admin</keywords>
Modified: trunk/core-identity/src/resources/portal-identity-war/WEB-INF/web.xml
===================================================================
--- trunk/core-identity/src/resources/portal-identity-war/WEB-INF/web.xml 2007-08-21
16:35:48 UTC (rev 8016)
+++ trunk/core-identity/src/resources/portal-identity-war/WEB-INF/web.xml 2007-08-21
16:55:37 UTC (rev 8017)
@@ -81,4 +81,15 @@
<load-on-startup>1</load-on-startup>
</servlet>
+ <!-- Captcha Servlet and Mapping -->
+ <servlet>
+ <servlet-name>jcaptcha</servlet-name>
+
<servlet-class>org.jboss.portal.core.identity.services.captcha.ImageCaptchaServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>jcaptcha</servlet-name>
+ <url-pattern>/jcaptcha</url-pattern>
+ </servlet-mapping>
+
</web-app>