Re: Review Request 57977: 'show databases' fails with access-denied when user doesn't have access to some of the databases

2017-03-27 Thread Madhan Neethiraj

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57977/#review170238
---


Ship it!




Ship It!

- Madhan Neethiraj


On March 27, 2017, 10:19 p.m., Abhay Kulkarni wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57977/
> ---
> 
> (Updated March 27, 2017, 10:19 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-1477
> https://issues.apache.org/jira/browse/RANGER-1477
> 
> 
> Repository: ranger
> 
> 
> Description
> ---
> 
> Ranger plugin optimizes on computing tags applicable for the 'show databases' 
> command by evaluating all tags with enabled policies, by with the matchScope 
> incorrectly set to "ANCESTOR' instead of 'DESCENDANT'.
> 
> 
> Diffs
> -
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagEnricher.java
>  f6638ba 
>   
> agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyEngine.java
>  87b5830 
>   
> agents-common/src/test/resources/policyengine/resourceTags_for_show_databases.json
>  PRE-CREATION 
>   
> agents-common/src/test/resources/policyengine/test_policyengine_descendant_tags.json
>  757b37d 
>   
> agents-common/src/test/resources/policyengine/test_policyengine_tag_hive_for_show_databases.json
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/57977/diff/1/
> 
> 
> Testing
> ---
> 
> Tested scenario in the Apache JIRA. Also, fixed a unit test case, and added 
> more unit tests for this scenario.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>



Review Request 57977: 'show databases' fails with access-denied when user doesn't have access to some of the databases

2017-03-27 Thread Abhay Kulkarni

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57977/
---

Review request for ranger and Madhan Neethiraj.


Bugs: RANGER-1477
https://issues.apache.org/jira/browse/RANGER-1477


Repository: ranger


Description
---

Ranger plugin optimizes on computing tags applicable for the 'show databases' 
command by evaluating all tags with enabled policies, by with the matchScope 
incorrectly set to "ANCESTOR' instead of 'DESCENDANT'.


Diffs
-

  
agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagEnricher.java
 f6638ba 
  
agents-common/src/test/java/org/apache/ranger/plugin/policyengine/TestPolicyEngine.java
 87b5830 
  
agents-common/src/test/resources/policyengine/resourceTags_for_show_databases.json
 PRE-CREATION 
  
agents-common/src/test/resources/policyengine/test_policyengine_descendant_tags.json
 757b37d 
  
agents-common/src/test/resources/policyengine/test_policyengine_tag_hive_for_show_databases.json
 PRE-CREATION 


Diff: https://reviews.apache.org/r/57977/diff/1/


Testing
---

Tested scenario in the Apache JIRA. Also, fixed a unit test case, and added 
more unit tests for this scenario.


Thanks,

Abhay Kulkarni