From 993a034527569b3aa180a5914dfbff6b14c8feb6 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 20 Mar 2019 20:32:10 +0400 Subject: [PATCH] #73 restore authentication --- src/main/java/ru/ulstu/user/util/UserUtils.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/ru/ulstu/user/util/UserUtils.java b/src/main/java/ru/ulstu/user/util/UserUtils.java index 377db6e..8524c74 100644 --- a/src/main/java/ru/ulstu/user/util/UserUtils.java +++ b/src/main/java/ru/ulstu/user/util/UserUtils.java @@ -23,9 +23,6 @@ public class UserUtils { } final Authentication authentication = securityContext.getAuthentication(); - if (authentication == null) { - return "admin"; - } if (authentication.getPrincipal() instanceof UserDetails) { final UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); return springSecurityUser.getUsername();