Repository: incubator-ranger
Updated Branches:
refs/heads/ranger-0.4 9c0c5d953 -> f79476bde
BUG-32018 : Issue in Hive policy creation in ranger for UDF resource if we
specify {{*}} ( access for all UDF)
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/f79476bd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/f79476bd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/f79476bd
Branch: refs/heads/ranger-0.4
Commit: f79476bde51cb9679c442cf80dcbe8b5ccb48c7b
Parents: 9c0c5d9
Author: rmani <[email protected]>
Authored: Fri Feb 20 14:35:25 2015 -0800
Committer: rmani <[email protected]>
Committed: Fri Feb 20 14:35:25 2015 -0800
----------------------------------------------------------------------
.../src/main/java/com/xasecure/biz/AssetMgr.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/f79476bd/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
b/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
index 521cea7..708d447 100644
--- a/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
+++ b/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
@@ -284,6 +284,9 @@ public class AssetMgr extends AssetMgrBase {
}
}
+ // set the resourceType based on the resource as there is issue
with resourceType coming from UI
+ // when resource is UDF
+
vXResource.setResourceType(xPolicyService.getResourceType(vXResource));
vXResource = xResourceService.createResource(vXResource);
@@ -308,7 +311,7 @@ public class AssetMgr extends AssetMgrBase {
@Override
public VXResource updateXResource(VXResource vXResource) {
-
+
UserSessionBase currentUserSession = ContextUtil
.getCurrentUserSession();
if (currentUserSession == null) {
@@ -453,7 +456,12 @@ public class AssetMgr extends AssetMgrBase {
List<XXTrxLog> trxLogList = xResourceService.getTransactionLog(
vXResource, xResouce, "update");
+ // set the resourceType based on the resource as there is issue
with resourceType coming from UI
+ // when resource is UDF
+
vXResource.setResourceType(xPolicyService.getResourceType(vXResource));
+
VXResource resource = super.updateXResource(vXResource);
+
List<VXPermMap> newPermMapList = vXResource.getPermMapList();
searchCriteria = new SearchCriteria();