mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-819: Only the creating user can move a record
RM-942: It's possible to move/copy/link to/from and delete from closed folder * general reliability of copy/link/move record actions improved * MoveRecords capability added as assignable * various scenarios tested and documented expected behaviour on related issues git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@56225 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -370,12 +370,20 @@ public class RecordCopyBehaviours implements RecordsManagementModel
|
||||
final NodeService nodeService = rmServiceRegistry.getNodeService();
|
||||
|
||||
//Generate the id for the copy
|
||||
String id = rmIdentifierService.generateIdentifier(nodeService.getType(nodeService.getPrimaryParent(targetNodeRef).getParentRef()), (nodeService.getPrimaryParent(targetNodeRef).getParentRef()));
|
||||
String id = rmIdentifierService.generateIdentifier(
|
||||
nodeService.getType(nodeService.getPrimaryParent(targetNodeRef).getParentRef()),
|
||||
(nodeService.getPrimaryParent(targetNodeRef).getParentRef()));
|
||||
|
||||
//We need to allow the id to be overwritten disable the policy protecting changes to the id
|
||||
behaviourFilter.disableBehaviour(targetNodeRef, ASPECT_RECORD_COMPONENT_ID);
|
||||
nodeService.setProperty(targetNodeRef, PROP_IDENTIFIER, id);
|
||||
behaviourFilter.enableBehaviour(targetNodeRef, ASPECT_RECORD_COMPONENT_ID);
|
||||
behaviourFilter.disableBehaviour();
|
||||
try
|
||||
{
|
||||
nodeService.setProperty(targetNodeRef, PROP_IDENTIFIER, id);
|
||||
}
|
||||
finally
|
||||
{
|
||||
behaviourFilter.enableBehaviour();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -129,8 +129,14 @@ public class RMv21CapabilityPatch extends ModulePatchComponent
|
||||
FilePlanRoleService.ROLE_ADMIN,
|
||||
FilePlanRoleService.ROLE_POWER_USER,
|
||||
FilePlanRoleService.ROLE_RECORDS_MANAGER,
|
||||
FilePlanRoleService.ROLE_SECURITY_OFFICER);
|
||||
}
|
||||
FilePlanRoleService.ROLE_SECURITY_OFFICER);
|
||||
addCapability(filePlan,
|
||||
"LinkToRecords",
|
||||
FilePlanRoleService.ROLE_ADMIN,
|
||||
FilePlanRoleService.ROLE_POWER_USER,
|
||||
FilePlanRoleService.ROLE_RECORDS_MANAGER,
|
||||
FilePlanRoleService.ROLE_SECURITY_OFFICER);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user