You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by sp...@apache.org on 2021/03/18 13:46:27 UTC

[ranger] branch master updated: RANGER-3203: Minor fix to use constants instead of hardcoded values

This is an automated email from the ASF dual-hosted git repository.

spolavarapu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 698c24b  RANGER-3203: Minor fix to use constants instead of hardcoded values
698c24b is described below

commit 698c24b729e8be5b03d4112c0f4f91e44fbfee7b
Author: Sailaja Polavarapu <sp...@cloudera.com>
AuthorDate: Thu Mar 18 06:46:15 2021 -0700

    RANGER-3203: Minor fix to use constants instead of hardcoded values
---
 .../apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java b/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
index 33fd67e..5bfaf20 100644
--- a/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
+++ b/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
@@ -541,8 +541,10 @@ public class LdapUserGroupBuilder implements UserGroupSource {
 										}
 										Map<String, String> groupAttrMap = new HashMap<>();
 										String groupName = getShortName(groupDN);
-										groupAttrMap.put("original_name", groupName);
-										groupAttrMap.put("full_name", groupDN);
+										groupAttrMap.put(UgsyncCommonConstants.ORIGINAL_NAME, groupName);
+										groupAttrMap.put(UgsyncCommonConstants.FULL_NAME, groupDN);
+										groupAttrMap.put(UgsyncCommonConstants.SYNC_SOURCE, currentSyncSource);
+										groupAttrMap.put(UgsyncCommonConstants.LDAP_URL, config.getLdapUrl());
 										sourceGroups.put(groupDN, groupAttrMap);
 										if (LOG.isDebugEnabled()) {
 											LOG.debug("As groupsearch is disabled, adding group " + groupName + " from user memberof attribute for user " + userName);