Merged HEAD-QA to HEAD (4.2) (including moving test classes into separate folders)

51903 to 54309 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54310 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Samuel Langlois
2013-08-20 17:17:31 +00:00
parent 0a36e2af67
commit ab4ca7177f
1576 changed files with 36419 additions and 8603 deletions

View File

@@ -26,6 +26,7 @@ import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -363,6 +364,15 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
endInvitation(startTask,
WorkflowModelNominatedInvitation.WF_TRANSITION_ACCEPT, null,
WorkflowModelNominatedInvitation.WF_TASK_INVITE_PENDING, WorkflowModelNominatedInvitation.WF_TASK_ACTIVIT_INVITE_PENDING);
//MNT-9101 Share: Cancelling an invitation for a disabled user, the user gets deleted in the process.
NodeRef person = personService.getPersonOrNull(invitation.getInviterUserName());
if (person != null && nodeService.hasAspect(person, ContentModel.ASPECT_ANULLABLE))
{
nodeService.removeAspect(person, ContentModel.ASPECT_ANULLABLE);
}
return invitation;
}
@@ -1144,6 +1154,8 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
public Object doWork() throws Exception
{
NodeRef person = personService.createPerson(properties);
//MNT-9101 Share: Cancelling an invitation for a disabled user, the user gets deleted in the process.
nodeService.addAspect(person, ContentModel.ASPECT_ANULLABLE, null);
permissionService.setPermission(person, finalUserName, PermissionService.ALL_PERMISSIONS, true);
return null;
@@ -1309,6 +1321,7 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
// else there are no existing people who have the given invitee
// email address so create new person
inviteeUserName = createInviteePerson(inviteeFirstName, inviteeLastName, inviteeEmail);
created = true;
if (logger.isDebugEnabled())
{
@@ -1639,7 +1652,9 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
siteTitle = siteInfo.getShortName();
}
return I18NUtil.getMessage(messageId, siteTitle);
Locale locale = (Locale) this.nodeService.getProperty(siteInfo.getNodeRef(), ContentModel.PROP_LOCALE);
return I18NUtil.getMessage(messageId, locale == null ? I18NUtil.getLocale() : locale, siteTitle);
}
/**