Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vpaturet committed Jun 10, 2024
1 parent 13e7f4e commit 583199a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class EnturUserContextService implements UserContextService {

private final ProviderRepository providerRepository;
private final AuthorizationService<String> userContextService;
private final AuthorizationService<String> authorizationService;
private final UserInfoExtractor userInfoExtractor;

public EnturUserContextService(
Expand All @@ -21,7 +21,7 @@ public EnturUserContextService(
) {
this.providerRepository = providerRepository;
this.userInfoExtractor = userInfoExtractor;
userContextService =
authorizationService =
new DefaultAuthorizationService<>(
this::getProviderCodespaceByProviderCode,
roleAssignmentExtractor
Expand All @@ -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) {
Expand Down

0 comments on commit 583199a

Please sign in to comment.