Skip to content
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

PIMS-2083 Remove Keycloak Roles Code #2676

Merged
merged 7 commits into from
Sep 19, 2024

Conversation

dbarkowsky
Copy link
Collaborator

@dbarkowsky dbarkowsky commented Sep 13, 2024

🎯 Summary

PIMS-2083

This ticket removes code that handled anything related to updating Keycloak roles.

This includes when a user logs in, is updated, when the cron job ran, etc.

This will break the following until the auth checks are also updated to use the database instead:

  • changing a user's role in PIMS will not have an effect on their permissions (it's still coming from Keycloak)
  • changing a user's role in Keycloak will affect permissions, but the database value will not update

We should not push this past DEV until the rest of the work is done.

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

codeclimate bot commented Sep 13, 2024

Code Climate has analyzed commit b5cb759 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 93.0%.

View more on Code Climate.

Copy link
Collaborator

@LawrenceLau2020 LawrenceLau2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, looks like it's no longer using the SSO Keycloak roles at all now. Changed user to a general user and it updated the role_id correctly in the database, also tested changing the role in Keycloak which has no effect as expected.

@dbarkowsky dbarkowsky merged commit 1d97341 into main Sep 19, 2024
8 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-2083-Remove-Keycloak-Roles-Code branch September 19, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants