Commit ba6314eb authored by Zaafar Ibrahim Raja's avatar Zaafar Ibrahim Raja

changed equals(lowerCase) to equalsIgnoreCase

parent eadf6654
Pipeline #10524 canceled with stages
......@@ -447,7 +447,7 @@ public class UserServiceImpl implements UserService {
public DbUser deleteByUsername(String username) {
User user = getCurrentUser();
if (!user.getUsername().equals(username.toLowerCase())
if (!user.getUsername().equalsIgnoreCase(username)
&& !SecurityContextHolder.getContext().getAuthentication().getAuthorities()
.contains(new SimpleGrantedAuthority("ROLE_ADMIN"))) {
throw new UnauthorizedException();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment