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:
Roy Wetherall
2013-10-02 04:11:21 +00:00
parent 7ff26e1158
commit b86621ce5c
6 changed files with 61 additions and 18 deletions

View File

@@ -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();
}
}
/**

View File

@@ -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);
}
}
/**