You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Pradeep Agrawal <pr...@freestoneinfotech.com> on 2016/04/26 10:55:48 UTC

Review Request 46679: RANGER-255 : Email Address discrepancy

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46679/
-----------------------------------------------------------

Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.


Bugs: RANGER-255
    https://issues.apache.org/jira/browse/RANGER-255


Repository: ranger


Description
-------

**Problem Statement :**

Email validations are not proper while creating and editing an user using REST api :
1. While creating user if I give "emailAddress":"hanish@g.com" then user get successfully created. But if I check details of that user then emailAddress is showing blank value.
2. While editing user if I give "emailAddress":"hanish@g.com" then it give error message that please enter valid email Address.
Same issue is occurring from Ranger admin UI.

**Proposed Solution :**
Added validation check on user's email address in createUser() call which was not happeing earlier. updateUser() is already having validation check so no changes required there.


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java 2d09591 
  security-admin/src/test/java/org/apache/ranger/biz/TestUserMgr.java e617de6 

Diff: https://reviews.apache.org/r/46679/diff/


Testing
-------

**Steps Performed (with patch) :**

1. Installed Ranger admin and started Ranger-admin.
2. Logged into Ranger admin->user/group page to create a user.
3. Tried to create/update a user with valid and invalid email address.
For example :
Invalid email case : create/update user with email address 'hanish@g.com'
Valid email case : create/update user with email address 'hanish@gmail.com'

**Expected Behaviour :**
1. Ranger should not allow to create user with invalid email address. 
2. Ranger should allow to create user with valid email address only.
3. Ranger should not allow to update user profile with invalid email address.
4. Ranger should allow to update user profile with valid email address only.

**Actual Behaviour :**
1. User creation failed with invalid email address 'hanish@g.com'.
2. User was created successfully with valid email address 'hanish@gmail.com'.
3. User profile updation failed for invalid email address 'hanish@g.com'.
4. User profile was updated successfully with valid email address 'hanish@yahoo.com'.


Thanks,

Pradeep Agrawal


Re: Review Request 46679: RANGER-255 : Email Address discrepancy

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46679/#review130629
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On April 26, 2016, 8:55 a.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46679/
> -----------------------------------------------------------
> 
> (Updated April 26, 2016, 8:55 a.m.)
> 
> 
> Review request for ranger, Alok Lal, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-255
>     https://issues.apache.org/jira/browse/RANGER-255
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement :**
> 
> Email validations are not proper while creating and editing an user using REST api :
> 1. While creating user if I give "emailAddress":"hanish@g.com" then user get successfully created. But if I check details of that user then emailAddress is showing blank value.
> 2. While editing user if I give "emailAddress":"hanish@g.com" then it give error message that please enter valid email Address.
> Same issue is occurring from Ranger admin UI.
> 
> **Proposed Solution :**
> Added validation check on user's email address in createUser() call which was not happeing earlier. updateUser() is already having validation check so no changes required there.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/UserMgr.java 2d09591 
>   security-admin/src/test/java/org/apache/ranger/biz/TestUserMgr.java e617de6 
> 
> Diff: https://reviews.apache.org/r/46679/diff/
> 
> 
> Testing
> -------
> 
> **Steps Performed (with patch) :**
> 
> 1. Installed Ranger admin and started Ranger-admin.
> 2. Logged into Ranger admin->user/group page to create a user.
> 3. Tried to create/update a user with valid and invalid email address.
> For example :
> Invalid email case : create/update user with email address 'hanish@g.com'
> Valid email case : create/update user with email address 'hanish@gmail.com'
> 
> **Expected Behaviour :**
> 1. Ranger should not allow to create user with invalid email address. 
> 2. Ranger should allow to create user with valid email address only.
> 3. Ranger should not allow to update user profile with invalid email address.
> 4. Ranger should allow to update user profile with valid email address only.
> 
> **Actual Behaviour :**
> 1. User creation failed with invalid email address 'hanish@g.com'.
> 2. User was created successfully with valid email address 'hanish@gmail.com'.
> 3. User profile updation failed for invalid email address 'hanish@g.com'.
> 4. User profile was updated successfully with valid email address 'hanish@yahoo.com'.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>