RANGER-5363: Filtering users by userRoleList parameter does not work in /xusers/users API #798
+222
−121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
When invoking the REST API
GET /service/xusers/users?userRoleList=ROLE_SYS_ADMIN
The userRoleList search filter is not applied as expected. The API returns users of all roles instead of filtering by the specified role, even when tested using an admin user.
Steps to Reproduce:
GET /service/xusers/users?userRoleList=ROLE_SYS_ADMIN
Expected Behavior:
The API should return only users matching the specified userRoleList value.
Actual Behavior:
The API ignores the userRoleList parameter and returns all users.
How was this patch tested?
Verified the userRoleList filter correctly restricts results.
Steps:
Call GET /service/xusers/users?userRoleList=ROLE_SYS_ADMIN.
Expected Result: The response list is correctly filtered and contains only users possessing the ROLE_SYS_ADMIN role.