ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject [22/26] incubator-ranger git commit: RANGER-748 : Fix - Users in policy got changed after upgrade
Date Wed, 02 Dec 2015 23:19:38 GMT
RANGER-748 : Fix - Users in policy got changed after upgrade


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/68ab77b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/68ab77b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/68ab77b2

Branch: refs/heads/tag-policy
Commit: 68ab77b298f817b3e3bd6544921d27bcae5e98b4
Parents: 44d3654
Author: Gautam Borad <gautam@apache.org>
Authored: Tue Nov 24 18:09:34 2015 +0530
Committer: Gautam Borad <gautam@apache.org>
Committed: Wed Dec 2 09:37:33 2015 +0530

----------------------------------------------------------------------
 .../main/java/org/apache/ranger/biz/RangerPolicyRetriever.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/68ab77b2/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyRetriever.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyRetriever.java
b/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyRetriever.java
index 4c65178..e3adc1d 100644
--- a/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyRetriever.java
+++ b/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyRetriever.java
@@ -44,6 +44,7 @@ import org.apache.ranger.entity.XXPolicyResourceMap;
 import org.apache.ranger.entity.XXPortalUser;
 import org.apache.ranger.entity.XXResourceDef;
 import org.apache.ranger.entity.XXService;
+import org.apache.ranger.entity.XXUser;
 import org.apache.ranger.plugin.model.RangerPolicy;
 import org.apache.ranger.plugin.model.RangerPolicy.RangerPolicyItem;
 import org.apache.ranger.plugin.model.RangerPolicy.RangerPolicyItemAccess;
@@ -250,10 +251,10 @@ public class RangerPolicyRetriever {
 				ret = userNames.get(userId);
 
 				if(ret == null) {
-					XXPortalUser user = daoMgr.getXXPortalUser().getById(userId);
+					XXUser user = daoMgr.getXXUser().getById(userId);
 
 					if(user != null) {
-						ret = user.getLoginId();
+						ret = user.getName(); // Name is `loginId`
 
 						userNames.put(userId,  ret);
 					}


Mime
View raw message