Skip to content

fix: refactor institution handling in user authorization and mutations [WIP]#1289

Draft
jekabs-karklins wants to merge 10 commits intodevelopfrom
SWAP-5157-update-upsertuserbyoidcsub
Draft

fix: refactor institution handling in user authorization and mutations [WIP]#1289
jekabs-karklins wants to merge 10 commits intodevelopfrom
SWAP-5157-update-upsertuserbyoidcsub

Conversation

@jekabs-karklins
Copy link
Contributor

@jekabs-karklins jekabs-karklins commented Dec 10, 2025

Description

This PR refactors the handling of institutions in user authorization and mutations, allowing for more robust and flexible management of user institutions.

Motivation and Context

This change is required to better handle situations where institution data is provided in different formats or from different sources. It aims to streamline the process of associating users with institutions, improving the overall user management workflow.

Changes

  1. Refactored getOrCreateUserInstitution method in OAuthAuthorization to accept different types of input (ROR ID, manual input, institution ID), and split into smaller, more specific methods.
  2. Updated getOrCreateUserInstitution method in StfcUserAuthorization to match the new input type.
  3. Updated getOrCreateUserInstitution method in UserAuthorization to match the new input type.

How Has This Been Tested

Unit tests have been updated and run to ensure the changes work as expected. Additionally, manual testing has been performed to verify correct functionality in a live environment.

How Has This Been Tested?

Fixes Jira Issue

https://jira.esss.lu.se/browse/SWAP-5157

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@jekabs-karklins jekabs-karklins requested a review from a team as a code owner December 10, 2025 10:46
@jekabs-karklins jekabs-karklins requested review from Scott-James-Hurley and removed request for a team December 10, 2025 10:46
@jekabs-karklins jekabs-karklins marked this pull request as draft December 10, 2025 12:24
@jekabs-karklins jekabs-karklins changed the title feat: refactor institution handling in user authorization and mutations [WIP] feat: refactor institution handling in user authorization and mutations Dec 10, 2025
@jekabs-karklins jekabs-karklins changed the title [WIP] feat: refactor institution handling in user authorization and mutations fix: refactor institution handling in user authorization and mutations [WIP] Dec 17, 2025
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.

1 participant