use of org.simbasecurity.core.domain.repository.UserRepository in project simba-os by cegeka.
the class ActiveDirectoryLoginModule method updateUserGroups.
private void updateUserGroups(LdapContext ldapContext, String userCN) {
UserRepository userRepository = GlobalContext.locate(UserRepository.class);
User user = userRepository.findByName(getUsername());
if (user != null) {
user.clearGroups();
try {
addADGroupsToUser(ldapContext, user, userCN);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Aggregations