----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/74141/ -----------------------------------------------------------
(Updated Dec. 3, 2022, 5:41 a.m.) Review request for ranger, Don Bosco Durai, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Nikhil P, Pradeep Agrawal, Ramesh Mani, Selvamohan Neethiraj, Sailaja Polavarapu, Subhrat Chaudhary, and Velmurugan Periasamy. Bugs: RANGER-3010 https://issues.apache.org/jira/browse/RANGER-3010 Repository: ranger Description ------- Added the new APIs which support for roleName instead of roleId . PublicAPIsv2: /api/roles/name/{name}/addUsersAndGroups /api/roles//name/{name}/removeUsersAndGroups /api/roles/name/{name}/removeAdminFromUsersAndGroups RoleREST: /roles/roles/name/{name}/addUsersAndGroups /roles/roles/name/{name}/removeUsersAndGroups /roles/roles/name/{name}/removeAdminFromUsersAndGroups As well as added the QueryParam annotation as part of the Rest API contract for the below API's PublicAPIsv2: /api/roles/name/{name}/addUsersAndGroups /api/roles/name/{name}/removeUsersAndGroups /api/roles/name/{name}/removeAdminFromUsersAndGroups /api/roles/{id}/addUsersAndGroups /api/roles/{id}/removeUsersAndGroups /api/roles/{id}/removeAdminFromUsersAndGroups RoleREST: /roles/roles/{id}/addUsersAndGroups /roles/roles/{id}/removeUsersAndGroups /roles/roles/{id}/removeAdminFromUsersAndGroups /roles/roles/name/{name}/addUsersAndGroups /roles/roles/name/{name}/removeUsersAndGroups /roles/roles/name/{name}/removeAdminFromUsersAndGroups Diffs (updated) ----- security-admin/src/main/java/org/apache/ranger/rest/PublicAPIsv2.java c7a6ea0a6 security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java 4f0edd2b0 security-admin/src/test/java/org/apache/ranger/rest/TestPublicAPIsv2.java 2a123de93 security-admin/src/test/java/org/apache/ranger/rest/TestRoleREST.java 217c1bba3 Diff: https://reviews.apache.org/r/74141/diff/3/ Changes: https://reviews.apache.org/r/74141/diff/2-3/ Testing ------- Tested the below Rest API's in the local and it works fine curl -u <adminUserName> -X PUT -H 'Content-Type:application/json' "http://<rangerHostName>:<port>/service/roles/roles/name/<roleName>/addUsersAndGroups?users=<users>&isAdmin=true&serviceName=<serviceName>&execUser=<execUser>&groups=<groups>" -v -k curl -u <adminUserName> -X PUT -H 'Content-Type:application/json' "http://<rangerHostName>:<port>/service/roles/api/roles/name/<roleName>/removeUsersAndGroups?users=<users>&serviceName=<serviceName>&execUser=<execUser>&groups=<groups>" -v -k curl -u <adminUserName> -X PUT -H 'Content-Type:application/json' "http://<rangerHostName>:<port>/service/roles/api/roles/name/<roleName>/removeUsersAndGroups?users=<users>&serviceName=<serviceName>&execUser=<execUser>&groups=<groups>" -v -k Thanks, Ramachandran Krishnan