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 1518e71  RANGER-2722: policies/hive/for-resource api call is returning 
deleted policies
1518e71 is described below

commit 1518e7124447264e6f2adabb9a267deeb7840030
Author: Abhay Kulkarni <[email protected]>
AuthorDate: Wed Feb 5 14:57:35 2020 -0800

    RANGER-2722: policies/hive/for-resource api call is returning deleted 
policies
---
 .../src/main/java/org/apache/ranger/biz/RangerPolicyAdminCache.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminCache.java
 
b/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminCache.java
index 266bfbb..df3c10d 100644
--- 
a/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminCache.java
+++ 
b/security-admin/src/main/java/org/apache/ranger/biz/RangerPolicyAdminCache.java
@@ -139,8 +139,8 @@ public class RangerPolicyAdminCache {
                                        ret = addPolicyAdmin(policies, roles, 
options);
                                }
                        } else {
-                               LOG.warn("ServicePolicies contain neither 
policies nor policy-deltas !");
-                               ret = null;
+                               LOG.warn("ServicePolicies contain neither 
policies nor policy-deltas. Will create policy engine with no policies!");
+                               ret = addPolicyAdmin(policies, roles, options);
                        }
 
                        if (ret != null) {

Reply via email to