Merged V2.2 to HEAD

7276: Add specific login error messages (as opposed to "unknown username...') in cases where users are disallowed and/or max users exceeded
   7277: Update to JMX-based admin: option to disable (and re-enable) link validation service

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8254 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-02-12 11:43:42 +00:00
parent 751fcbb1fa
commit 1633ef3132
9 changed files with 159 additions and 9 deletions

View File

@@ -130,14 +130,14 @@ public class AuthenticationServiceImpl implements AuthenticationService
if ((allowedUsers != null) && (! allowedUsers.contains(userName)))
{
throw new AuthenticationException("Username not allowed: " + userName);
throw new AuthenticationDisallowedException("Username not allowed: " + userName);
}
Integer maxUsers = (Integer)sysAdminCache.get(KEY_SYSADMIN_MAX_USERS);
if ((maxUsers != null) && (maxUsers != -1) && (ticketComponent.getUsersWithTickets(true).size() >= maxUsers))
{
throw new AuthenticationException("Max users exceeded: " + maxUsers);
throw new AuthenticationMaxUsersException("Max users exceeded: " + maxUsers);
}
authenticationComponent.authenticate(userName, password);