OBPIH-6265 Fix issue with removing user roles while exporting a recei…#4564
Merged
awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from Mar 25, 2024
Merged
OBPIH-6265 Fix issue with removing user roles while exporting a recei…#4564awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from
awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from
Conversation
awalkowiak
approved these changes
Mar 25, 2024
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.
…ving template
The issue was that we were sending a recipient with details, e.g. with roles, that was then bound via
// Bind the partial receipt bindData(partialReceipt, jsonObject)To fix that I just send the id of the recipient instead of its full representation.
The tricky part was to understand why sometimes only a few roles are deleted and some are not - it's because we were sending the roles by its name, e.g.
ROLE_SUPERUSER, and if a role's id is not equal to the name, then it is not bound.In my case, it was
ROLE_REQUISITION_APPROVERandROLE_PRODUCT_MANAGERthat had it also as theid, hence they were bound properly.