You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by sanket shelar <sa...@gmail.com> on 2023/08/22 07:14:10 UTC

Review Request 74556: RANGER-4373: Deleting a role which is already present in policy is giving incorrect message.

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

Review request for ranger, dinesh  akhand, Kishor Gollapalliwar, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.


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


Repository: ranger


Description
-------

In case if a role is already present in policy and we try to delete the role then we are getting message as "data not found" instead of "Role  can not be deleted as it is referenced in one or more policies"


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java 4bfaa862c 


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


Testing
-------

Tested for role delete scenarios.


Thanks,

sanket shelar


Re: Review Request 74556: RANGER-4373: Deleting a role which is already present in policy is giving incorrect message.

Posted by Ramachandran Krishnan <ra...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74556/#review225667
-----------------------------------------------------------




security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java
Line 289 (original), 290 (patched)
<https://reviews.apache.org/r/74556/#comment314129>

    Can you write a Unit case to cover this condition ?


- Ramachandran Krishnan


On Aug. 22, 2023, 7:14 a.m., sanket shelar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74556/
> -----------------------------------------------------------
> 
> (Updated Aug. 22, 2023, 7:14 a.m.)
> 
> 
> Review request for ranger, dinesh  akhand, Kishor Gollapalliwar, Abhay Kulkarni, Madhan Neethiraj, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4373
>     https://issues.apache.org/jira/browse/RANGER-4373
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> In case if a role is already present in policy and we try to delete the role then we are getting message as "data not found" instead of "Role  can not be deleted as it is referenced in one or more policies"
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java 4bfaa862c 
> 
> 
> Diff: https://reviews.apache.org/r/74556/diff/1/
> 
> 
> Testing
> -------
> 
> Tested for role delete scenarios.
> 
> 
> Thanks,
> 
> sanket shelar
> 
>