This is an automated email from the ASF dual-hosted git repository.
madhan 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 8391df2 RANGER-2893: fix show grant on database fail in Ranger Hive
plugin
8391df2 is described below
commit 8391df288a002cd5b0995998df36511d185867e2
Author: joey.ljy <[email protected]>
AuthorDate: Fri Jul 3 22:13:57 2020 +0800
RANGER-2893: fix show grant on database fail in Ranger Hive plugin
Signed-off-by: Madhan Neethiraj <[email protected]>
---
.../ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
b/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
index c876110..e54f93a 100644
---
a/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
+++
b/hive-agent/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizer.java
@@ -2246,7 +2246,7 @@ public class RangerHiveAuthorizer extends
RangerHiveAuthorizerBase {
try {
HiveObjectRef msObjRef =
AuthorizationUtils.getThriftHiveObjectRef(privObj);
- if (msObjRef.getObjectName() == null) {
+ if (msObjRef.getDbName() == null) {
throw new
HiveAuthzPluginException("RangerHiveAuthorizer.showPrivileges() only supports
SHOW PRIVILEGES for Hive resources and not user level");
}
@@ -2381,7 +2381,7 @@ public class RangerHiveAuthorizer extends
RangerHiveAuthorizerBase {
if (msObjRef != null) {
HivePrivilegeObject hivePrivilegeObject = null;
- if (msObjRef.getObjectName() != null) {
+ if (msObjRef.getDbName() != null) {
// when resource is specified in the
show grants, acl will be for that resource / user / groups
objectType =
getPluginPrivilegeObjType(msObjRef.getObjectType());
dbName = msObjRef.getDbName();