-
Notifications
You must be signed in to change notification settings - Fork 1k
RANGER-5212: Search filter in Roles tab does not consider all relevant role columns #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR extends the existing “Role Name” filter so that it also searches values in the sub-role (Associated Role) column.
- Adds a new “Associated Role” text filter to the Roles tab UI
- Registers
subRoleNameandsubRoleNamePartialin the service search fields and request parameter mapping - Hooks the new filters into the backend predicate logic
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| security-admin/.../RoleListing.jsx | Added new UI filter object for Associated Role |
| security-admin/.../RangerRoleServiceBase.java | Registered full and partial sub-role search fields |
| security-admin/.../RangerSearchUtil.java | Mapped HTTP parameters for sub-role filters |
| agents-common/.../SearchFilter.java | Defined constants for subRoleName filters |
| agents-common/.../RolePredicateUtil.java | Added predicate calls for new sub-role filters |
...min/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/role_details/RoleListing.jsx
Outdated
Show resolved
Hide resolved
agents-common/src/main/java/org/apache/ranger/plugin/store/RolePredicateUtil.java
Outdated
Show resolved
Hide resolved
agents-common/src/main/java/org/apache/ranger/plugin/store/RolePredicateUtil.java
Outdated
Show resolved
Hide resolved
dhavaljrajpara
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI changes are approved
25beaa5 to
90334f1
Compare
90334f1 to
bdeacf4
Compare
agents-common/src/main/java/org/apache/ranger/plugin/util/SearchFilter.java
Outdated
Show resolved
Hide resolved
bdeacf4 to
971a896
Compare
What changes were proposed in this pull request?
When using the Role Name filter, it only matches values from the Role Name column. It does not match values from the Roles column, even though that column contains the role for Role Admin and Role Auditor
How was this patch tested?
Verify that the 'Role Name' filter retrieves all matching records, regardless of whether the value resides in the 'Role Name' column or the 'Roles' column.