You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Qiang Zhang (JIRA)" <ji...@apache.org> on 2017/04/15 01:10:42 UTC
[jira] [Closed] (RANGER-1507) Do some code improvement in UserSync
[ https://issues.apache.org/jira/browse/RANGER-1507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Qiang Zhang closed RANGER-1507.
-------------------------------
> Do some code improvement in UserSync
> ------------------------------------
>
> Key: RANGER-1507
> URL: https://issues.apache.org/jira/browse/RANGER-1507
> Project: Ranger
> Issue Type: Improvement
> Components: usersync
> Affects Versions: 1.0.0
> Reporter: Qiang Zhang
> Assignee: Qiang Zhang
> Fix For: 1.0.0
>
>
> In UserSync.java, there are some duplicate codes.
> {code}
> 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);
> }
> {code}
> We checked if the groupName is null twice, IMO, we can put them together.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)