Kundan Kumar Jha created RANGER-4055:
----------------------------------------
Summary: Compulsory field firstName can be passed empty or null in
the payload while creating user through API
Key: RANGER-4055
URL: https://issues.apache.org/jira/browse/RANGER-4055
Project: Ranger
Issue Type: Bug
Components: Ranger
Reporter: Kundan Kumar Jha
Problem Statement:
While creating a user from UI its firstName is a compulsory field but while
creating it through making POST request on /xuser/secure/users its not a
compulsory parameter.
Steps to reproduce:
Make a post request on /xuser/secure/users endpoint with following payload:
{ "name":"temp_user_abc_12345", "firstName":null, "lastName": "user1",
"loginId": "user1", "emailAddress" : null, "description" : "user1 desc",
"password" : "user1Pass@123", "groupIdList":[1], "groupNameList":["public"],
"status":1, "isVisible":1, "userRoleList": [ "ROLE_USER" ], "userSource": 0 }
Response:
{ "id": 323, "createDate": "2023-01-17T06:49:12Z", "updateDate":
"2023-01-17T06:49:12Z", "owner": "Admin", "updatedBy": "Admin",
"name": "temp_user_abc_12345", "lastName": "user1", "password":
"*****", "description": "user1 desc", "groupIdList": [ 1 ],
"groupNameList": [ "public" ], "status": 1,
"isVisible": 1, "userSource": 0, "userRoleList": [ "ROLE_USER"
] }
With firstName as null also the user is creating successfully.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)