@PostConstruct
public void init() {
if (userGrantedAuthorities.size() == 0) { // to prevent a bug that makes this bean initialized twice
//Roles for "normal" users
GrantedAuthority roleUser = new SimpleGrantedAuthority("ROLE_USER");
userGrantedAuthorities.add(roleUser);
//Roles for "admin" users, configured in tatami.properties
GrantedAuthority roleAdmin = new SimpleGrantedAuthority("ROLE_ADMIN");
adminGrantedAuthorities.add(roleUser);
adminGrantedAuthorities.add(roleAdmin);
String adminUsersList = env.getProperty("tatami.admin.users");
String[] adminUsersArray = adminUsersList.split(",");