From 613db46e5fbb055f38d3e75cd8e8780bb46c5d8a Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Fri, 24 Oct 2014 11:43:59 +0000 Subject: [PATCH] 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 --- .../security/authentication/AbstractAuthenticationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/java/org/alfresco/repo/security/authentication/AbstractAuthenticationService.java b/source/java/org/alfresco/repo/security/authentication/AbstractAuthenticationService.java index 560cea6c83..1bb8e750a1 100644 --- a/source/java/org/alfresco/repo/security/authentication/AbstractAuthenticationService.java +++ b/source/java/org/alfresco/repo/security/authentication/AbstractAuthenticationService.java @@ -53,7 +53,7 @@ public abstract class AbstractAuthenticationService implements AuthenticationSer 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); }