Commit c23ab8e5 authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

anon can no longer logout

parent f53166dd
Pipeline #11689 failed with stage
in 9 minutes and 13 seconds
......@@ -5,6 +5,7 @@ import java.util.stream.Collectors;
import javax.transaction.Transactional;
import lcsb.mapviewer.common.Configuration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
......@@ -37,7 +38,7 @@ public class UserDetailsServiceImpl implements UserDetailsService {
return org.springframework.security.core.userdetails.User
.withUsername(username)
.password(user.getCryptedPassword())
.disabled(user.isRemoved())
.disabled(user.isRemoved() || username.equals(Configuration.ANONYMOUS_LOGIN))
.authorities(authorities)
.build();
}
......
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