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



It looks like "groupName" can be set in "findBasicUserProperties" so maybe this 
check should be left as it is.

- Colm O hEigeartaigh


On April 14, 2017, 2:25 a.m., Qiang Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58331/
> -----------------------------------------------------------
> 
> (Updated April 14, 2017, 2:25 a.m.)
> 
> 
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O 
> hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan 
> Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1507
>     https://issues.apache.org/jira/browse/RANGER-1507
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> In UserSync.java, there are some duplicate codes.
> if (groupName == null || groupName.isEmpty()) {
>             // Perform basic user search and get the group name from the 
> user's group attribute name.
>             findBasicUserProperties(ldapContext, false);
>         }
> 
>         if (groupName == null || groupName.isEmpty()) {
>             // Perform adv user search and get the group name from the user's 
> group attribute name.
>             findAdvUserProperties(ldapContext, false);
>         }
> We checked if the groupName is null twice, IMO, we can put them together.
> 
> 
> Diffs
> -----
> 
>   
> ugsync/ldapconfigchecktool/ldapconfigcheck/src/main/java/org/apache/ranger/ldapconfigcheck/UserSync.java
>  cab4072 
> 
> 
> Diff: https://reviews.apache.org/r/58331/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qiang Zhang
> 
>

Reply via email to