From 697e985f64240e0614f8a9c6725b99527bc0282b Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Fri, 5 Jan 2024 10:14:24 +0100 Subject: [PATCH] Imports optimized --- .../src/main/java/access/security/CustomOidcUserService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/access/security/CustomOidcUserService.java b/server/src/main/java/access/security/CustomOidcUserService.java index 03da6d7c..9672d7b8 100644 --- a/server/src/main/java/access/security/CustomOidcUserService.java +++ b/server/src/main/java/access/security/CustomOidcUserService.java @@ -45,11 +45,11 @@ public OidcUser loadUser(OidcUserRequest userRequest) throws OAuth2Authenticatio String sub = (String) newClaims.get("sub"); Optional optionalUser = userRepository.findBySubIgnoreCase(sub); - boolean institutionAdmin = InstitutionAdmin.isInstitutionAdmin(claims, entitlement) || + boolean institutionAdmin = isInstitutionAdmin(claims, entitlement) || (optionalUser.isPresent() && isInstitutionAdmin(optionalUser.get())); newClaims.put(INSTITUTION_ADMIN, institutionAdmin); - String organizationGuid = InstitutionAdmin.getOrganizationGuid(claims, organizationGuidPrefix, optionalUser) + String organizationGuid = getOrganizationGuid(claims, organizationGuidPrefix, optionalUser) .orElse(null); newClaims.put(ORGANIZATION_GUID, organizationGuid);