fix: refactor institution handling in user authorization and mutation#1289
Open
jekabs-karklins wants to merge 16 commits intodevelopfrom
Open
fix: refactor institution handling in user authorization and mutation#1289jekabs-karklins wants to merge 16 commits intodevelopfrom
jekabs-karklins wants to merge 16 commits intodevelopfrom
Conversation
…gging created institution ID
…nd for user upsert
added 3 commits
February 24, 2026 13:45
jekabs-karklins
commented
Feb 24, 2026
Comment on lines
+44
to
+46
| rorId?: string | null; | ||
| name?: string | null; | ||
| country?: string | null; |
Contributor
Author
There was a problem hiding this comment.
comment: Setting null will set the value to null, leaving undefined will take the defautl value
added 3 commits
February 24, 2026 16:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR refactors the way
institutionis defined when calling upserUserByOidcMotivation and Context
This change allows to call upserUserByOidc and specify institution in two ways
Either specifying
RorIdor
{institutionName: string, institutionCountry: string}Changes
getOrCreateUserInstitutionmethod inOAuthAuthorizationto accept different types of input (ROR ID, manual input, institution ID), and split into smaller, more specific methods.getOrCreateUserInstitutionmethod inStfcUserAuthorizationto match the new input type.getOrCreateUserInstitutionmethod inUserAuthorizationto match the new input type.How Has This Been Tested
Unit tests have been added and updated and run to ensure the changes work as expected. Additionally, manual testing has been performed to verify correct functionality in a live environment.
Fixes Jira Issue
https://jira.esss.lu.se/browse/SWAP-5157