Skip to content

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
OBPIH-6265
Mar 25, 2024
Merged

OBPIH-6265 Fix issue with removing user roles while exporting a recei…#4564
awalkowiak merged 1 commit intofeature/upgrade-to-grails-3.3.10from
OBPIH-6265

Conversation

@kchelstowski
Copy link
Collaborator

…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_APPROVER and ROLE_PRODUCT_MANAGER that had it also as the id, hence they were bound properly.

@awalkowiak awalkowiak merged commit 73a2d74 into feature/upgrade-to-grails-3.3.10 Mar 25, 2024
@awalkowiak awalkowiak deleted the OBPIH-6265 branch March 25, 2024 17:14
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