RANGER-5623: Updated XUserMgr.java to solve UI consistency for put groupusers endpoint#992
Open
krishnamuttevi wants to merge 3 commits into
Open
RANGER-5623: Updated XUserMgr.java to solve UI consistency for put groupusers endpoint#992krishnamuttevi wants to merge 3 commits into
krishnamuttevi wants to merge 3 commits into
Conversation
385b1f3 to
905a7e0
Compare
|
|
||
| XXGroupUser xxGroupUser = null; | ||
|
|
||
| if (vXGroupUser.getId() != null) { |
Contributor
There was a problem hiding this comment.
what if vXGroupUser itself is null.
Contributor
Author
There was a problem hiding this comment.
I've updated the function to include a validation check for invalid inputs. Could you please take a look at the latest commit
9a5caac to
3a137e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.