mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-994: Records filed from unfiled container do not pick up vital record review period or disposition schedule
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@56135 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -169,8 +169,8 @@ public class RecordCopyBehaviours implements RecordsManagementModel
|
||||
{
|
||||
if (nodeService.exists(newNodeRef) == true)
|
||||
{
|
||||
// Remove unwanted aspects
|
||||
removeUnwantedAspects(nodeService, newNodeRef);
|
||||
// only remove the search details .. the rest will be resolved automatically
|
||||
nodeService.removeAspect(newNodeRef, RecordsManagementSearchBehaviour.ASPECT_RM_SEARCH);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@@ -482,6 +482,10 @@ public class RecordServiceImpl implements RecordService,
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (AlfrescoRuntimeException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally
|
||||
{
|
||||
onCreateChildAssociation.enable();
|
||||
@@ -659,28 +663,27 @@ public class RecordServiceImpl implements RecordService,
|
||||
ParameterCheck.mandatory("filePlan", filePlan);
|
||||
ParameterCheck.mandatory("nodeRef", nodeRef);
|
||||
ParameterCheck.mandatory("isLinked", isLinked);
|
||||
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_RECORD) == false)
|
||||
|
||||
// first we do a sanity check to ensure that the user has at least write permissions on the document
|
||||
if (permissionService.hasPermission(nodeRef, PermissionService.WRITE) != AccessStatus.ALLOWED)
|
||||
{
|
||||
// first we do a sanity check to ensure that the user has at least write permissions on the document
|
||||
if (permissionService.hasPermission(nodeRef, PermissionService.WRITE) != AccessStatus.ALLOWED)
|
||||
throw new AccessDeniedException("Can not create record from document, because the user " +
|
||||
AuthenticationUtil.getFullyAuthenticatedUser() +
|
||||
" does not have Write permissions on the doucment " +
|
||||
nodeRef.toString());
|
||||
}
|
||||
|
||||
// Save the id of the currently logged in user
|
||||
final String userId = AuthenticationUtil.getRunAsUser();
|
||||
|
||||
// do the work of creating the record as the system user
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
throw new AccessDeniedException("Can not create record from document, because the user " +
|
||||
AuthenticationUtil.getFullyAuthenticatedUser() +
|
||||
" does not have Write permissions on the doucment " +
|
||||
nodeRef.toString());
|
||||
}
|
||||
|
||||
// Save the id of the currently logged in user
|
||||
final String userId = AuthenticationUtil.getRunAsUser();
|
||||
|
||||
// do the work of creating the record as the system user
|
||||
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
|
||||
{
|
||||
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_RECORD) == false)
|
||||
{
|
||||
// disable delete rules
|
||||
ruleService.disableRuleType("outbound");
|
||||
try
|
||||
@@ -745,11 +748,11 @@ public class RecordServiceImpl implements RecordService,
|
||||
{
|
||||
ruleService.enableRuleType("outbound");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -267,7 +267,15 @@ public class VitalRecordServiceImpl implements VitalRecordService,
|
||||
nodeService.setProperties(nodeRef, props);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// if we are re-filling then remove the vital aspect if it is not longer a vital record
|
||||
if (nodeService.hasAspect(nodeRef, ASPECT_VITAL_RECORD) == true)
|
||||
{
|
||||
nodeService.removeAspect(nodeRef, ASPECT_VITAL_RECORD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user