Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

93248: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud)
      93130: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.1)
         93124: Merged DEV to V4.2-BUG-FIX (4.2.5)
            92705 : MNT-12991 : Disabled users can be invited in site
               - Added check for disabled user
               - Added unit test


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94946 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-01-31 12:14:38 +00:00
parent 744d19fdae
commit 7daae89983
2 changed files with 14 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2013 Alfresco Software Limited.
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
@@ -1340,6 +1340,18 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
Object objs[] = { inviteeUserName, inviteeEmail, siteShortName };
throw new InvitationExceptionUserError("invitation.invite.already_member", objs);
}
/**
* throw exception if person is disabled
*/
if (!personService.isEnabled(inviteeUserName))
{
if (logger.isDebugEnabled())
logger.debug("Failed - invitee user is disabled.");
Object objs[] = { inviteeUserName, inviteeEmail, siteShortName };
throw new InvitationExceptionUserError("invitation.invite.user_disabled", objs);
}
//