Bug 793571 (JBEPP-650) - GTNPORTAL-1673 make UI validation regular expressions configurable by users
Summary: GTNPORTAL-1673 make UI validation regular expressions configurable by users
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-650
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal
Version: 5.0.0.GA,5.0.1.GA,5.1.0.GA,5.1.1.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.1.GA
Assignee: claprun@redhat.com
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-19 18:11 UTC by Gary Hu
Modified: 2018-11-27 20:16 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Several fields requiring user names were previously validated using hardcoded logic, which prevented users from easily changing what user name formats were acceptable for their requirements. The fix implements ExpressionValidator, which permits user name validation changes without having to customize the source code. The validator allows users to specify the format required for valid user names, which overrides the default field validation present in the portal.
Clone Of:
Environment:
Last Closed: 2012-02-09 19:23:00 UTC
Type: Feature Request
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GTNPORTAL-1673 0 Major Resolved make UI validation regular expressions configurable by users 2014-04-08 12:37:25 UTC
Red Hat Issue Tracker JBEPP-650 0 Major Closed GTNPORTAL-1673 make UI validation regular expressions configurable by users 2014-04-08 12:37:26 UTC

Description Gary Hu 2010-11-19 18:11:56 UTC
Affects: Documentation (Ref Guide, User Guide, etc.), Release Notes
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000004U6DXIA0&sfdc.override=1
project_key: JBEPP

The current exoadmin portlet uses hard coded regular expressions to validate the UI component form in multiple java files under portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component.

For example, the org.exoplatform.organization.webui.component.UIGroupMembershipForm class has the following lines:
   addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).addValidator(MandatoryValidator.class)
  .addValidator(ExpressionValidator.class, "^\\p{L}[\\p{L}\\d._\\-,]+$", "UIGroupMembershipForm.msg.Invalid-char"));

Can we make the validation expressions configurable by users? We can still keep the current validation expressions as the default but allow the user defined expressions to override the default.

Comment 1 Gary Hu 2010-11-19 18:12:25 UTC
Link: Added: This issue Cloned to GTNPORTAL-1673


Comment 2 Masafumi Miura 2011-09-20 01:24:22 UTC
Affects: Added: [Documentation (Ref Guide, User Guide, etc.), Release Notes]


Comment 4 Jared MORGAN 2011-11-17 03:49:09 UTC
Set Release Notes Not Yet Documented because this issue is a Customer-initiated issue.
When the issue is fixed, all issues with Helpdesk ticket references *must* have a release note provided, and
included in the Release Notes document.


Comment 5 Jared MORGAN 2011-11-17 03:49:09 UTC
Release Notes Docs Status: Added: Not Yet Documented


Comment 10 Thomas Heute 2012-01-03 15:21:05 UTC
Labels: Added: EPP_5_2_1_Candidate EPP_6_0_0_Candidate


Comment 12 Marc Zottner 2012-01-05 13:42:53 UTC
Hi everyone!

I badly need this one for a customer that uses emails as user names.

A customizable/central/extensible regex and error message for the validation of usernames and passwords would be enough (4 elements).


At the moment the validation texts seem to be distributed in different properties files.

/GATEIN/deploy/gatein.ear/02portal.war/WEB-INF/classes/locale/portal/webuiXXX.properties
-> UIGroupMembershipForm.msg.Invalid-char
-> ResourceValidator.msg.Invalid-char
-> UIGroupMembershipForm.msg.Invalid-char

/GATEIN/deploy/gatein.ear/02portal.war/WEB-INF/classes/locale/portal/servicesXXX.properties
-> IdentifierValidator.msg.invalid-char
-> NameValidator.msg.invalid-char


best regards,

Marc

Comment 14 Thomas Heute 2012-01-12 10:32:12 UTC
Labels: Removed: EPP_5_2_1_Candidate EPP_6_0_0_Candidate Added: EPP_5_2_1_Candidate


Comment 15 Thomas Heute 2012-01-12 10:35:42 UTC
Labels: Removed: EPP_5_2_1_Candidate 


Comment 17 Chris Laprun 2012-02-09 19:23:00 UTC
Needs to be tested more thoroughly. 

Comment 18 Chris Laprun 2012-02-09 19:23:00 UTC
Release Notes Text: Added: Several fields requiring user names where previously validated using hardcoded logic, thus preventing users from easily changing which user names were acceptable for their requirements. A new configurable validator has been implemented that can be configured by users without having to modify the source code thus allowing users to more easily change the format for valid user names.


Comment 19 Patrice Lamarque 2012-03-15 16:01:09 UTC
this change seem to have created an incompatibility with eXo WCM. 

wcm 2.3.6 does not work properly on top of EPP 5.2 ER1 : 
https://jira.exoplatform.org/browse/SPUB-154

It's blocker for SP 5.2.1

Comment 20 claprun@redhat.com 2012-03-15 16:04:06 UTC
Changes have been made to remediate the issue. A new version of EPP 5.2.1 should be available soon.

Comment 21 Jared MORGAN 2012-03-22 03:01:55 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Several fields requiring user names where previously
validated using hardcoded logic, thus preventing users from easily changing
which user names were acceptable for their requirements. A new configurable
validator has been implemented that can be configured by users without having
to modify the source code thus allowing users to more easily change the format
for valid user names.

Comment 22 Jared MORGAN 2012-03-27 23:36:12 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,6 +1 @@
-Several fields requiring user names where previously
+Several fields requiring user names were previously validated using hardcoded logic, which prevented users from easily changing what user name formats were acceptable for their requirements. The fix implements ExpressionValidator, which permits user name validation changes without having to customize the source code. The validator allows users to specify the format required for valid user names, which overrides the default field validation present in the portal.-validated using hardcoded logic, thus preventing users from easily changing
-which user names were acceptable for their requirements. A new configurable
-validator has been implemented that can be configured by users without having
-to modify the source code thus allowing users to more easily change the format
-for valid user names.


Note You need to log in before you can comment on or make changes to this bug.