You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ab...@apache.org on 2020/07/14 21:09:20 UTC
[ranger] branch master updated: RANGER-2858: 'show databases' gives
permission denied error,
even though the user has permissions on a few of the databases in security
zone policies - Part III
This is an automated email from the ASF dual-hosted git repository.
abhay 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 4a1c375 RANGER-2858: 'show databases' gives permission denied error, even though the user has permissions on a few of the databases in security zone policies - Part III
4a1c375 is described below
commit 4a1c375088ad351ea5b1f727bcbb225ec044c344
Author: Abhay Kulkarni <ab...@apache.org>
AuthorDate: Tue Jul 14 13:26:05 2020 -0700
RANGER-2858: 'show databases' gives permission denied error, even though the user has permissions on a few of the databases in security zone policies - Part III
---
.../org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java b/agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java
index dbdb780..25c8d22 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java
@@ -468,7 +468,7 @@ public class RangerPolicyEngineImpl implements RangerPolicyEngine {
}
}
- if (request.isAccessTypeAny() && CollectionUtils.isEmpty(zoneNames) && ret != null && !ret.getIsAllowed() && MapUtils.isNotEmpty(policyEngine.getZonePolicyRepositories())) {
+ if (request.isAccessTypeAny() && (request.getResource() == null || CollectionUtils.isEmpty(request.getResource().getKeys())) && ret != null && !ret.getIsAllowed() && MapUtils.isNotEmpty(policyEngine.getZonePolicyRepositories())) {
// resource is empty and access is ANY
if (LOG.isDebugEnabled()) {
LOG.debug("Process all security-zones");