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



Why you want to delete such policies. Can you give more details on your side 
use case or the problem you are facing here. Also there could be many users who 
want such policies as madhan explained above.

So if you really want this fix in your environment i would suggest to make it 
configurable through either approach:

1) At the service level through service config page and add a custom property 
there. if the value of that property is set to true then only your code shall 
delete the policy. by default property shall not be there so its value will be 
false and in that case policies should not be deleted. 

or

2) The same configuration can be added at the application level in 
ranger-admin-default-site.xml and default value shall be false and in that case 
policies should not be deleted.

- Pradeep Agrawal


On June 11, 2020, 5:51 p.m., Haoxiang Ma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72588/
> -----------------------------------------------------------
> 
> (Updated June 11, 2020, 5:51 p.m.)
> 
> 
> Review request for ranger.
> 
> 
> Bugs: RANGER-2856
>     https://issues.apache.org/jira/browse/RANGER-2856
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> A policy should be deleted if it has no policyItems
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java 
> 9be61f2eb 
> 
> 
> Diff: https://reviews.apache.org/r/72588/diff/1/
> 
> 
> Testing
> -------
> 
> 1.Compilation OK
> 2.Already used in production environment
> 
> 
> Thanks,
> 
> Haoxiang Ma
> 
>

Reply via email to