You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Brijesh Bhalala <br...@gmail.com> on 2023/06/21 06:35:48 UTC

Review Request 74485: RANGER-4132: If view policy button is clicked for a policy which is deleted, then the page gets stuck in loading state

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

Review request for ranger, Dhaval Rajpara, Dineshkumar Yadav, Madhan Neethiraj, Mehul Parikh, Mugdha Varadkar, Nikunj Pansuriya, and Nitin Galave.


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


Repository: ranger


Description
-------

In Ranger Admin UI, the policies list for a specific service are not updated automatically.
So in case a page is open for a specific service and it contains a policy, for e.g with policy id 99, and the policy is deleted from another tab / from an API request,
and if the user clicks on the view policy button, the server returns a 400 bad request error, but the page gets stuck with the message "Please wait".
In such scenarios, there should be a message which states that the policy has been deleted and it should refresh the list of policies for a specific service


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java f653dbc8a 
  security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java e0ff95814 
  security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java 7fb7d9c79 
  security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 66fa22163 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java e91d3bc71 
  security-admin/src/main/webapp/react-webapp/src/components/CommonComponents.jsx 7fe756c47 
  security-admin/src/main/webapp/react-webapp/src/utils/fetchAPI.js 5d9a7d5c4 
  security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx abb58c94d 
  security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx e5c8bc399 
  security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/AddUpdatePolicyForm.jsx a27cbaa28 
  security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/EditUserView.jsx e47fccc6f 


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


Testing
-------

1)Build and Verified Ranger Admin setup with this changes.
2)Verified the following things:-
  - CRUD Operation for Policy module
  - multiple tab scenarios for the policies, service & users/groups/roles


Thanks,

Brijesh Bhalala


Re: Review Request 74485: RANGER-4132: If view policy button is clicked for a policy which is deleted, then the page gets stuck in loading state

Posted by Dhaval Rajpara <dh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74485/#review225585
-----------------------------------------------------------


Ship it!




Ship It!

- Dhaval Rajpara


On June 21, 2023, 6:35 a.m., Brijesh Bhalala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74485/
> -----------------------------------------------------------
> 
> (Updated June 21, 2023, 6:35 a.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dineshkumar Yadav, Madhan Neethiraj, Mehul Parikh, Mugdha Varadkar, Nikunj Pansuriya, and Nitin Galave.
> 
> 
> Bugs: RANGER-4132
>     https://issues.apache.org/jira/browse/RANGER-4132
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> In Ranger Admin UI, the policies list for a specific service are not updated automatically.
> So in case a page is open for a specific service and it contains a policy, for e.g with policy id 99, and the policy is deleted from another tab / from an API request,
> and if the user clicks on the view policy button, the server returns a 400 bad request error, but the page gets stuck with the message "Please wait".
> In such scenarios, there should be a message which states that the policy has been deleted and it should refresh the list of policies for a specific service
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java f653dbc8a 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java e0ff95814 
>   security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java 7fb7d9c79 
>   security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 66fa22163 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java e91d3bc71 
>   security-admin/src/main/webapp/react-webapp/src/components/CommonComponents.jsx 7fe756c47 
>   security-admin/src/main/webapp/react-webapp/src/utils/fetchAPI.js 5d9a7d5c4 
>   security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx abb58c94d 
>   security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx e5c8bc399 
>   security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/AddUpdatePolicyForm.jsx a27cbaa28 
>   security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/EditUserView.jsx e47fccc6f 
> 
> 
> Diff: https://reviews.apache.org/r/74485/diff/1/
> 
> 
> Testing
> -------
> 
> 1)Build and Verified Ranger Admin setup with this changes.
> 2)Verified the following things:-
>   - CRUD Operation for Policy module
>   - multiple tab scenarios for the policies, service & users/groups/roles
> 
> 
> Thanks,
> 
> Brijesh Bhalala
> 
>


Re: Review Request 74485: RANGER-4132: If view policy button is clicked for a policy which is deleted, then the page gets stuck in loading state

Posted by Mugdha Varadkar <mu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74485/#review225584
-----------------------------------------------------------


Ship it!




Ship It!

- Mugdha Varadkar


On June 21, 2023, 6:35 a.m., Brijesh Bhalala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74485/
> -----------------------------------------------------------
> 
> (Updated June 21, 2023, 6:35 a.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dineshkumar Yadav, Madhan Neethiraj, Mehul Parikh, Mugdha Varadkar, Nikunj Pansuriya, and Nitin Galave.
> 
> 
> Bugs: RANGER-4132
>     https://issues.apache.org/jira/browse/RANGER-4132
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> In Ranger Admin UI, the policies list for a specific service are not updated automatically.
> So in case a page is open for a specific service and it contains a policy, for e.g with policy id 99, and the policy is deleted from another tab / from an API request,
> and if the user clicks on the view policy button, the server returns a 400 bad request error, but the page gets stuck with the message "Please wait".
> In such scenarios, there should be a message which states that the policy has been deleted and it should refresh the list of policies for a specific service
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java f653dbc8a 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java e0ff95814 
>   security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java 7fb7d9c79 
>   security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 66fa22163 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java e91d3bc71 
>   security-admin/src/main/webapp/react-webapp/src/components/CommonComponents.jsx 7fe756c47 
>   security-admin/src/main/webapp/react-webapp/src/utils/fetchAPI.js 5d9a7d5c4 
>   security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx abb58c94d 
>   security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx e5c8bc399 
>   security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/AddUpdatePolicyForm.jsx a27cbaa28 
>   security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/EditUserView.jsx e47fccc6f 
> 
> 
> Diff: https://reviews.apache.org/r/74485/diff/1/
> 
> 
> Testing
> -------
> 
> 1)Build and Verified Ranger Admin setup with this changes.
> 2)Verified the following things:-
>   - CRUD Operation for Policy module
>   - multiple tab scenarios for the policies, service & users/groups/roles
> 
> 
> Thanks,
> 
> Brijesh Bhalala
> 
>


Re: Review Request 74485: RANGER-4132: If view policy button is clicked for a policy which is deleted, then the page gets stuck in loading state

Posted by Dhaval Rajpara <dh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74485/#review225603
-----------------------------------------------------------


Ship it!




Ship It!

- Dhaval Rajpara


On July 12, 2023, 9:30 a.m., Brijesh Bhalala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74485/
> -----------------------------------------------------------
> 
> (Updated July 12, 2023, 9:30 a.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dineshkumar Yadav, Madhan Neethiraj, Mehul Parikh, Mugdha Varadkar, Nikunj Pansuriya, and Nitin Galave.
> 
> 
> Bugs: RANGER-4132
>     https://issues.apache.org/jira/browse/RANGER-4132
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> In Ranger Admin UI, the policies list for a specific service are not updated automatically.
> So in case a page is open for a specific service and it contains a policy, for e.g with policy id 99, and the policy is deleted from another tab / from an API request,
> and if the user clicks on the view policy button, the server returns a 400 bad request error, but the page gets stuck with the message "Please wait".
> In such scenarios, there should be a message which states that the policy has been deleted and it should refresh the list of policies for a specific service
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java f653dbc8a 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java e0ff95814 
>   security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java a4dd6ef89 
>   security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 66fa22163 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java ce26b1d66 
>   security-admin/src/main/webapp/react-webapp/src/utils/fetchAPI.js 5d9a7d5c4 
>   security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx abb58c94d 
>   security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx d74f9a83e 
>   security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/AddUpdatePolicyForm.jsx cc34488ea 
>   security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/EditUserView.jsx e47fccc6f 
> 
> 
> Diff: https://reviews.apache.org/r/74485/diff/2/
> 
> 
> Testing
> -------
> 
> 1)Build and Verified Ranger Admin setup with this changes.
> 2)Verified the following things:-
>   - CRUD Operation for Policy module
>   - multiple tab scenarios for the policies, service & users/groups/roles
> 
> 
> Thanks,
> 
> Brijesh Bhalala
> 
>


Re: Review Request 74485: RANGER-4132: If view policy button is clicked for a policy which is deleted, then the page gets stuck in loading state

Posted by Brijesh Bhalala <br...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74485/
-----------------------------------------------------------

(Updated July 12, 2023, 9:30 a.m.)


Review request for ranger, Dhaval Rajpara, Dineshkumar Yadav, Madhan Neethiraj, Mehul Parikh, Mugdha Varadkar, Nikunj Pansuriya, and Nitin Galave.


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


Repository: ranger


Description
-------

In Ranger Admin UI, the policies list for a specific service are not updated automatically.
So in case a page is open for a specific service and it contains a policy, for e.g with policy id 99, and the policy is deleted from another tab / from an API request,
and if the user clicks on the view policy button, the server returns a 400 bad request error, but the page gets stuck with the message "Please wait".
In such scenarios, there should be a message which states that the policy has been deleted and it should refresh the list of policies for a specific service


Diffs (updated)
-----

  security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java f653dbc8a 
  security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java e0ff95814 
  security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java a4dd6ef89 
  security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 66fa22163 
  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java ce26b1d66 
  security-admin/src/main/webapp/react-webapp/src/utils/fetchAPI.js 5d9a7d5c4 
  security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx abb58c94d 
  security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx d74f9a83e 
  security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/AddUpdatePolicyForm.jsx cc34488ea 
  security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/EditUserView.jsx e47fccc6f 


Diff: https://reviews.apache.org/r/74485/diff/2/

Changes: https://reviews.apache.org/r/74485/diff/1-2/


Testing
-------

1)Build and Verified Ranger Admin setup with this changes.
2)Verified the following things:-
  - CRUD Operation for Policy module
  - multiple tab scenarios for the policies, service & users/groups/roles


Thanks,

Brijesh Bhalala


Re: Review Request 74485: RANGER-4132: If view policy button is clicked for a policy which is deleted, then the page gets stuck in loading state

Posted by Sneha Surjuse via Review Board <no...@reviews.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74485/#review225594
-----------------------------------------------------------


Ship it!




I have thoroughly tested the functionality related to users and policies, and I can confirm that it is now working as expected. I have addressed the issue where the Ranger Admin UI was not providing an appropriate message when a policy is deleted. Instead of getting stuck with the 'Please wait' message, the UI now displays a clear message informing the user that the policy has been deleted.

- Sneha Surjuse


On June 21, 2023, 6:35 a.m., Brijesh Bhalala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74485/
> -----------------------------------------------------------
> 
> (Updated June 21, 2023, 6:35 a.m.)
> 
> 
> Review request for ranger, Dhaval Rajpara, Dineshkumar Yadav, Madhan Neethiraj, Mehul Parikh, Mugdha Varadkar, Nikunj Pansuriya, and Nitin Galave.
> 
> 
> Bugs: RANGER-4132
>     https://issues.apache.org/jira/browse/RANGER-4132
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> In Ranger Admin UI, the policies list for a specific service are not updated automatically.
> So in case a page is open for a specific service and it contains a policy, for e.g with policy id 99, and the policy is deleted from another tab / from an API request,
> and if the user clicks on the view policy button, the server returns a 400 bad request error, but the page gets stuck with the message "Please wait".
> In such scenarios, there should be a message which states that the policy has been deleted and it should refresh the list of policies for a specific service
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java f653dbc8a 
>   security-admin/src/main/java/org/apache/ranger/common/RESTErrorUtil.java e0ff95814 
>   security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java 7fb7d9c79 
>   security-admin/src/main/java/org/apache/ranger/rest/SecurityZoneREST.java 66fa22163 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java e91d3bc71 
>   security-admin/src/main/webapp/react-webapp/src/components/CommonComponents.jsx 7fe756c47 
>   security-admin/src/main/webapp/react-webapp/src/utils/fetchAPI.js 5d9a7d5c4 
>   security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyLogs.jsx abb58c94d 
>   security-admin/src/main/webapp/react-webapp/src/views/AuditEvent/AdminLogs/PolicyViewDetails.jsx e5c8bc399 
>   security-admin/src/main/webapp/react-webapp/src/views/PolicyListing/AddUpdatePolicyForm.jsx a27cbaa28 
>   security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/EditUserView.jsx e47fccc6f 
> 
> 
> Diff: https://reviews.apache.org/r/74485/diff/1/
> 
> 
> Testing
> -------
> 
> 1)Build and Verified Ranger Admin setup with this changes.
> 2)Verified the following things:-
>   - CRUD Operation for Policy module
>   - multiple tab scenarios for the policies, service & users/groups/roles
> 
> 
> Thanks,
> 
> Brijesh Bhalala
> 
>