-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74040/
-----------------------------------------------------------
Review request for ranger, bhavik patel, Dhaval Shah, Abhay Kulkarni, Madhan
Neethiraj, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, and Velmurugan
Periasamy.
Bugs: RANGER-3807
https://issues.apache.org/jira/browse/RANGER-3807
Repository: ranger
Description
-------
**Problem statement:** When we make a request to the API
/roles/roles/user/{user} with any random string or not existing users it return
empty list with response code 200. it should throw an error if provided user
does not exist in ranger db.
**Proposed solution:** Check the user exist or not, if user does not exist then
throw the error.
Diffs
-----
security-admin/src/main/java/org/apache/ranger/rest/RoleREST.java e00767643
Diff: https://reviews.apache.org/r/74040/diff/1/
Testing
-------
Tested with patch.
Request:
curl -X GET --header "text/json" -H "Content-Type: text/json" -u
admin:Ranger@1234 "http://localhost:6080/service/roles/roles/user/randomuser"
Response:
{"statusCode":1,"msgDesc":"randomuser is Not
Found","messageList":[{"name":"DATA_NOT_FOUND","rbKey":"xa.error.data_not_found","message":"Data
not found"}]}
Thanks,
Pradeep Agrawal