mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user