-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIU-3294: Provide correct role-assignment permissions for endpoints within withUserRoles HOC used with UserEdit. #2821
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please confirm that these permissions will be sufficient to assign a role when none have ever been assigned before. e.g. for circ-storage we need both post and put. Do we need the same for roles, e.g. roles.user.item.post
to assign the first role and then .put
to update assignments on subsequent edits?
PS: please describe the solution in your PR title, not the bug. After your PR merges, the bug will be gone. I want to know about the state of the code after the code merges, because that's the state things will be in after this PR is committed. Sth like "Provide correct role-assignment permissions in user-view and user-edit psets" would be an option. |
No, it’s not necessary. When we create user keycloak record, the assignedRoleIds are set to empty. We already check for the user’s existence: if the user does not exist, a confirmation dialog is shown, suggesting the creation of a Keycloak account, on submit we create record in keycloak and call .put method for selected roles |
Quality Gate passedIssues Measures |
…ithin withUserRoles HOC used with UserEdit. (#2821) Refs UIU-3294.
* UIU-3282: add capability to access users-keycloak delete method (#2810) Refs UIU-3282. * UIU-3273: check if userId is present in withUserRoles HOC (#2816) Refs UIU-3273. * UIU-3294: Provide correct role-assignment permissions for endpoints within withUserRoles HOC used with UserEdit. (#2821) Refs UIU-3294. * Release v11.0.9 --------- Co-authored-by: aidynoJ <[email protected]>
Purpose
UIU-3294 - Error toasts when opening a user for edit without having "User Roles" capability set
Approach
TODOS and Open Questions
Learning
Pre-Merge Checklist
Before merging this PR, please go through the following list and take appropriate actions.
If there are breaking changes, please STOP and consider the following:
Ideally all of the PRs involved in breaking changes would be merged in the same day to avoid breaking the folio-testing environment. Communication is paramount if that is to be achieved, especially as the number of intermodule and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems, ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.