Repository: incubator-ranger
Updated Branches:
  refs/heads/master 2d8d15aeb -> 415ed4399


RANGER-926: Ranger UI validation changes to allow . [dot] in firstname and 
lastname fields


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/415ed439
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/415ed439
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/415ed439

Branch: refs/heads/master
Commit: 415ed4399f131a02e7141ec347fe653b7db59902
Parents: 2d8d15a
Author: Gautam Borad <[email protected]>
Authored: Fri Apr 15 16:08:09 2016 +0530
Committer: Gautam Borad <[email protected]>
Committed: Thu Apr 28 12:20:09 2016 +0530

----------------------------------------------------------------------
 .../src/main/java/org/apache/ranger/common/StringUtil.java       | 2 +-
 security-admin/src/main/webapp/scripts/models/VXPortalUser.js    | 4 ++--
 security-admin/src/main/webapp/scripts/views/users/UserForm.js   | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/415ed439/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java
----------------------------------------------------------------------
diff --git 
a/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java 
b/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java
index c292fec..521d16e 100644
--- a/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java
+++ b/security-admin/src/main/java/org/apache/ranger/common/StringUtil.java
@@ -34,7 +34,7 @@ public class StringUtil implements Serializable {
 
        static final public int MIN_PASSWORD_LENGTH = 8;
 
-       static final public String VALIDATION_NAME = "[\\w\\ \\-\\']*";
+       static final public String VALIDATION_NAME = "[\\w\\ \\-\\'\\.]*";
        static final public String VALIDATION_TEXT = "[a-zA-Z0-9\\ 
\"!@#$%^&amp;*()-_=+;:'&quot;|~`&lt;&gt;?/{}\\.\\,\\-\\?<>]*";
        static final public String VALIDATION_LOGINID = 
"[a-z,A-Z][\\w\\-\\_]*[a-z,A-Z,0-9]";
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/415ed439/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXPortalUser.js 
b/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
index 6d05e8e..f2b7a10 100644
--- a/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
+++ b/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
@@ -50,14 +50,14 @@ define(function(require){
                                firstName : {
                                        type            : 'Text',
                                        title           : 
localization.tt("lbl.firstName")+' *',
-                                       validators  : 
['required',{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_-]*[a-zA-Z0-9]+$/,message
 :'First name should start with alphabets & can have underscore, hyphen, 
space.'}],
+                                       validators  : 
['required',{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_.-]*[a-zA-Z0-9]+$/,message
 :'First name should start with alphabets & can have number,underscore, hyphen, 
space, dot.'}],
                                        editorAttrs : { 'placeholder' : 
localization.tt("lbl.firstName")}
                                        
                                },
                                lastName : {
                                        type            : 'Text',
                                        title           : 
localization.tt("lbl.lastName"),
-                                       validators  : 
[{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_-]*[a-zA-Z0-9]+$/,message :'Last 
name should start with alphabets & can have underscore, hyphen, space.'}],
+                                       validators  : 
['required',{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_.-]*[a-zA-Z0-9]+$/,message
 :'Last name should start with alphabets & can have number,underscore, hyphen, 
space, dot.'}],
                                        editorAttrs : { 'placeholder' : 
localization.tt("lbl.lastName")}
                                },
                                emailAddress : {

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/415ed439/security-admin/src/main/webapp/scripts/views/users/UserForm.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/users/UserForm.js 
b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
index 8319901..8a8c78b 100644
--- a/security-admin/src/main/webapp/scripts/views/users/UserForm.js
+++ b/security-admin/src/main/webapp/scripts/views/users/UserForm.js
@@ -83,12 +83,12 @@ define(function(require){
                                firstName : { 
                                        type            : 'Text',
                                        title           : 
localization.tt("lbl.firstName")+' *',
-                                       validators  : 
['required',{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_-]*[a-zA-Z0-9]+$/,message
 :'First name should start with alphabets & can have underscore, hyphen, 
space.'}]
+                                       validators  : 
['required',{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_.-]*[a-zA-Z0-9]+$/,message
 :'First name should start with alphabets & can have number,underscore, hyphen, 
space, dot.'}]
                                },
                                lastName : { 
                                        type            : 'Text',
                                        title           : 
localization.tt("lbl.lastName"),
-                                       validators  : 
[{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_-]*[a-zA-Z0-9]+$/,message :'Last 
name should start with alphabets & can have underscore, hyphen, space.'}]
+                                       validators  : 
[{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_.-]*[a-zA-Z0-9]+$/,message :'Last 
name should start with alphabets & can have number,underscore, hyphen, space, 
dot.'}]
                                },
                                emailAddress : {
                                        type            : 'Text',

Reply via email to