mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ACE-3216 - server.maxusers count does not work correctly - off by one
- Fix fun off-by-one error meaning that 1 users = 0 users hoho! ACE-3296 - SysAdmin bean should validate values for server.maxusers - or it is possible to accidently lock out the admin user! - Fix to ensure that although -1 means "infinite users allowed", a value of -2 or less does not mean "no users allowed" double-hoho! git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@89105 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,7 +53,7 @@ public abstract class AbstractAuthenticationService implements AuthenticationSer
|
|||||||
|
|
||||||
Integer maxUsers = (Integer) sysAdminParams.getMaxUsers();
|
Integer maxUsers = (Integer) sysAdminParams.getMaxUsers();
|
||||||
|
|
||||||
if ((maxUsers != null) && (maxUsers != -1) && (getUsersWithTickets(true).size() >= maxUsers))
|
if ((maxUsers != null) && (maxUsers > -1) && (getUsersWithTickets(true).size() > maxUsers))
|
||||||
{
|
{
|
||||||
throw new AuthenticationMaxUsersException("Max users exceeded: " + maxUsers);
|
throw new AuthenticationMaxUsersException("Max users exceeded: " + maxUsers);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user