From b9943d50e5fbd46837354f719bcc336acaf02033 Mon Sep 17 00:00:00 2001 From: Olivier Levitt Date: Thu, 12 Dec 2024 17:18:16 +0100 Subject: [PATCH] Fix sonar --- .../insee/onyxia/api/security/LogUserInfoFilter.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/onyxia-api/src/main/java/fr/insee/onyxia/api/security/LogUserInfoFilter.java b/onyxia-api/src/main/java/fr/insee/onyxia/api/security/LogUserInfoFilter.java index aeb64be1..767a4f8d 100644 --- a/onyxia-api/src/main/java/fr/insee/onyxia/api/security/LogUserInfoFilter.java +++ b/onyxia-api/src/main/java/fr/insee/onyxia/api/security/LogUserInfoFilter.java @@ -15,9 +15,15 @@ @Component public class LogUserInfoFilter extends OncePerRequestFilter { - @Autowired private UserProvider userProvider; + private UserProvider userProvider; - @Autowired private RegionsConfiguration regionsConfiguration; + private RegionsConfiguration regionsConfiguration; + + @Autowired + public LogUserInfoFilter(UserProvider userProvider, RegionsConfiguration regionsConfiguration) { + this.userProvider = userProvider; + this.regionsConfiguration = regionsConfiguration; + } @Override protected void doFilterInternal(