> On May 12, 2016, 3:58 p.m., Sailaja Polavarapu wrote:
> > Currently in ranger admin side we are generating random GUID for email
> > address if it is empty (src/main/java/org/apache/ranger/biz/UserMgr.java).
> > Along with the change in usersync, I believe we also need to remove the
> > code to generate random GUID for empty email address. Can you please make
> > those changes as well?
Thanks Sailaja, I am looking into this. After removing the GUI generation in
UserMgr I received an exception when creating a new user from the UI:
Internal Exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Duplicate entry '' for key 'x_portal_user_UK_email'
Error Code: 1062
Call: INSERT INTO x_portal_user (ADDED_BY_ID, CREATE_TIME, EMAIL, FIRST_NAME,
LAST_NAME, LOGIN_ID, NOTES, PASSWORD, PUB_SCR_NAME, STATUS, UPDATE_TIME,
UPD_BY_ID, USER_SRC) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
bind => [13 parameters bound]
Query: InsertObjectQuery(XXPortalUser={XXDBBase={createTime={Thu May 12
21:20:11 EDT 2016} updateTime={Thu May 12 21:20:11 EDT 2016} addedByUserId={1}
updatedByUserId={1} }firstName={Bryan} lastName={} publicScreenName={bbende}
loginId={bbende} password={***length=32***} emailAddress={} status={1}
userSource={0} notes={null} })
at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
I'll keep looking at it, but really the intent of this JIRA I think was to not
generate the default email address in the file-based usersync where it was
generating "user@hostname".
- Bryan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47133/#review132931
-----------------------------------------------------------
On May 13, 2016, 1:06 p.m., Bryan Bende wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47133/
> -----------------------------------------------------------
>
> (Updated May 13, 2016, 1:06 p.m.)
>
>
> Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
>
>
> Bugs: RANGER-978
> https://issues.apache.org/jira/browse/RANGER-978
>
>
> Repository: ranger
>
>
> Description
> -------
>
> Removing one line that was populating an email address in the usersync and
> setting it to user@HOSTNAME.
>
>
> Diffs
> -----
>
>
> ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java
> 068c9df
>
> Diff: https://reviews.apache.org/r/47133/diff/
>
>
> Testing
> -------
>
> Tested full build and ran usersync to verify email addresses were not
> populated.
>
>
> Thanks,
>
> Bryan Bende
>
>