diff --git a/src/ext/java/no/entur/uttu/ext/entur/security/EnturUserContextService.java b/src/ext/java/no/entur/uttu/ext/entur/security/EnturUserContextService.java index 2f287893..a55d5a99 100644 --- a/src/ext/java/no/entur/uttu/ext/entur/security/EnturUserContextService.java +++ b/src/ext/java/no/entur/uttu/ext/entur/security/EnturUserContextService.java @@ -11,7 +11,7 @@ public class EnturUserContextService implements UserContextService { private final ProviderRepository providerRepository; - private final AuthorizationService userContextService; + private final AuthorizationService authorizationService; private final UserInfoExtractor userInfoExtractor; public EnturUserContextService( @@ -21,7 +21,7 @@ public EnturUserContextService( ) { this.providerRepository = providerRepository; this.userInfoExtractor = userInfoExtractor; - userContextService = + authorizationService = new DefaultAuthorizationService<>( this::getProviderCodespaceByProviderCode, roleAssignmentExtractor @@ -35,12 +35,12 @@ public String getPreferredName() { @Override public boolean isAdmin() { - return userContextService.isRouteDataAdmin(); + return authorizationService.isRouteDataAdmin(); } @Override public boolean hasAccessToProvider(String providerCode) { - return userContextService.canEditRouteData(providerCode); + return authorizationService.canEditRouteData(providerCode); } private String getProviderCodespaceByProviderCode(String providerCode) {