B-20313: Prevent Role List Duplication #14087
Merged
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.
B-20313
INT PR
Summary
In Admin App when viewing an Office Users Roles the roles list would sometimes duplicate. It is very inconsistent when this happens and may not even happen for us locally. I remember during PI planning that this was being cause because the GET Office-users call would return duplicate roles. Although i could not reproduce locally I was able to work with Alex to reproduce in loadtest to make sure that what was happening with the API endpoint during PI planning is exactly what is causing the duplication on the Admin UI now. (See screenshot below)
Notice the roles are duplicated in the payload. The AdminAPI displays what it receives from this call.
![RoleDuplicationIssue](https://private-user-images.githubusercontent.com/136514590/378965566-f84eb955-57ad-4cb1-a381-84bb9ead43f3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMTYyNDcsIm5iZiI6MTczOTAxNTk0NywicGF0aCI6Ii8xMzY1MTQ1OTAvMzc4OTY1NTY2LWY4NGViOTU1LTU3YWQtNGNiMS1hMzgxLTg0YmI5ZWFkNDNmMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOFQxMTU5MDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jZDY2YWRiNzk2M2VhMzk4MDRjYWJhY2NmNGU2NTI0YzU5NzUzNTNkYWU4MDhiNDZiZDE1NzkwMjgyZjQxMzNiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9._A2xTdBukpH1xN7AmRdaw1wiiWH_2jHbigHnk8cBjYU)
this article explains more about the approach used.
Verification Steps for the Author
These are to be checked by the author.
Verification Steps for Reviewers
These are to be checked by a reviewer.
Setup to Run the Code
How to test
Frontend
officeApp
class or custommin-width
styling is used to hide any states the would not be visible to the user.Backend
Database
Any new migrations/schema changes:
Screenshots