add a disabled state to users

This commit is contained in:
Athou
2013-03-29 12:59:21 +01:00
parent 04ce8b3a3b
commit 60bcb64828
7 changed files with 83 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ public class UserService extends GenericDAO<User, Long> {
public User login(String name, String password) {
List<User> users = findByField(MF.i(MF.p(User.class).getName()), name);
User user = Iterables.getFirst(users, null);
if (user != null) {
if (user != null && !user.isDisabled()) {
boolean authenticated = encryptionService.authenticate(password,
user.getPassword(), user.getSalt());
if (authenticated) {