Skip to content

RANGER-5623: Updated XUserMgr.java to solve UI consistency for put groupusers endpoint#992

Open
krishnamuttevi wants to merge 3 commits into
apache:masterfrom
krishnamuttevi:RANGER-5623
Open

RANGER-5623: Updated XUserMgr.java to solve UI consistency for put groupusers endpoint#992
krishnamuttevi wants to merge 3 commits into
apache:masterfrom
krishnamuttevi:RANGER-5623

Conversation

@krishnamuttevi
Copy link
Copy Markdown
Contributor

When updating a user-group relationship using the PUT /service/xusers/groupusers API, the backend updates successfully and the UI "Users" tab looks fine. However, the "Groups" tab shows old data—it still lists the user under their old group and doesn't show them in the new one. This happens because the "Groups" view isn't getting the right group reference to trigger a proper refresh.

Solved it by:
Declared XXGroupuser and added validation checks for all mandatory fields to make sure the data is clean.

Explicitly added parentGroupId to vxGroupuser so the UI has the correct group context to update both tabs properly.

Verified that updating a user-group mapping now correctly updates both the "Users" and "Groups" tabs in the UI without leaving any stale data.


XXGroupUser xxGroupUser = null;

if (vXGroupUser.getId() != null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if vXGroupUser itself is null.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the function to include a validation check for invalid inputs. Could you please take a look at the latest commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants