mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'hotfix-2.4.0.x/outlook-integration' into 'release/V2.4.0.x'
Hotfix 2.4.0.x/outlook integration * add mvn helpers to include outlook integration into RM dev env (does not effect released product) * fix MNT-16535 - map AddChild permission to corresponding RM permission * back-port RM-3286 to fix MNT-16605 See merge request !403
This commit is contained in:
15
README.txt
15
README.txt
@@ -44,4 +44,19 @@ Updating License Headers:
|
||||
|
||||
In order to refesh out of date license source headers run the following command:
|
||||
|
||||
|
||||
mvn clean install -Dlicense.update.dryrun=false
|
||||
|
||||
|
||||
Configuring Outlook Integration:
|
||||
-------------------------------
|
||||
|
||||
To download and run RM with the Outlook Integration AMPs installed on the repo and Share use the following commands:
|
||||
|
||||
mvn clean install -Pstart-repo,outlook-integration
|
||||
mvn clean install -Pstart-share,outlook-integration
|
||||
|
||||
Follow these instructions install licence and Outlook plugin:
|
||||
|
||||
- http://docs.alfresco.com/outlook2.1/tasks/Outlook-license.html
|
||||
- http://docs.alfresco.com/outlook2.1/tasks/Outlook-install_v2.html
|
||||
|
@@ -37,3 +37,4 @@ rm.action.event-not-undone=The event {0} can't be undone, because it's not defin
|
||||
rm.action.node-not-record-category=The disposition schedule could not be created, because the actioned upon node ({0}) was not a record category.
|
||||
rm.action.parameter-not-supplied=The parameter ''{0}'' has not been supplied.
|
||||
rm.action.delete-not-hold-type=The hold couldn't be deleted, because the node isn't of type {0}. (actionedUponNodeRef={1})
|
||||
rm.action.record-folder-create=Operation failed, because you can't place a record folder into another record folder.
|
||||
|
@@ -31,6 +31,7 @@ import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.behaviour.AbstractDisposableItem;
|
||||
import org.alfresco.module.org_alfresco_module_rm.record.RecordService;
|
||||
import org.alfresco.module.org_alfresco_module_rm.recordfolder.RecordFolderService;
|
||||
@@ -49,6 +50,7 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* rma:recordFolder behaviour bean
|
||||
@@ -73,6 +75,9 @@ public class RecordFolderType extends AbstractDisposableItem
|
||||
/** vital record service */
|
||||
protected VitalRecordService vitalRecordService;
|
||||
|
||||
/** I18N */
|
||||
private static final String MSG_CANNOT_CREATE_RECORD_FOLDER = "rm.action.record-folder-create";
|
||||
|
||||
/**
|
||||
* @param recordService record service
|
||||
*/
|
||||
@@ -211,12 +216,13 @@ public class RecordFolderType extends AbstractDisposableItem
|
||||
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean bNew)
|
||||
{
|
||||
NodeRef nodeRef = childAssocRef.getChildRef();
|
||||
if (nodeService.exists(nodeRef) && instanceOf(nodeRef, TYPE_RECORD_FOLDER))
|
||||
|
||||
if (nodeService.exists(nodeRef))
|
||||
{
|
||||
// ensure nothing is being added to a closed record folder
|
||||
NodeRef recordFolder = childAssocRef.getParentRef();
|
||||
Boolean isClosed = (Boolean) nodeService.getProperty(recordFolder, PROP_IS_CLOSED);
|
||||
if (isClosed != null && Boolean.TRUE.equals(isClosed))
|
||||
if (isClosed != null && isClosed)
|
||||
{
|
||||
throw new AlfrescoRuntimeException("You can't add new items to a closed record folder.");
|
||||
}
|
||||
@@ -238,6 +244,12 @@ public class RecordFolderType extends AbstractDisposableItem
|
||||
{
|
||||
final NodeRef recordFolder = childAssocRef.getChildRef();
|
||||
|
||||
// only records can be added in a record folder or hidden folders(is the case of e-mail attachments)
|
||||
if (!instanceOf(recordFolder, ContentModel.TYPE_CONTENT) && !nodeService.hasAspect(recordFolder, ContentModel.ASPECT_HIDDEN))
|
||||
{
|
||||
throw new AlfrescoRuntimeException(I18NUtil.getMessage(MSG_CANNOT_CREATE_RECORD_FOLDER));
|
||||
}
|
||||
|
||||
behaviourFilter.disableBehaviour();
|
||||
try
|
||||
{
|
||||
|
@@ -68,7 +68,7 @@ public class RecordsManagementPermissionPostProcessor extends PermissionPostProc
|
||||
result = permissionService.hasPermission(nodeRef, RMPermissionModel.READ_RECORDS);
|
||||
}
|
||||
// if write deinied on rm artificat
|
||||
else if (PermissionService.WRITE.equals(perm))
|
||||
else if (PermissionService.WRITE.equals(perm) || PermissionService.ADD_CHILDREN.equals(perm))
|
||||
{
|
||||
// check for file record
|
||||
result = permissionService.hasPermission(nodeRef, RMPermissionModel.FILE_RECORDS);
|
||||
|
Reference in New Issue
Block a user