mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge remote-tracking branch 'remotes/origin/release/V2.5' into merge-2.6/MNT-18558_PermissionIssue
# Conflicts: # rm-automation/rm-automation-ui/src/test/java/org/alfresco/test/community/level2/record/DeclareInPlaceRecords.java
This commit is contained in:
@@ -35,6 +35,7 @@ import java.util.Map;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.module.org_alfresco_module_rm.RecordsManagementServiceRegistry;
|
||||
import org.alfresco.module.org_alfresco_module_rm.model.RecordsManagementModel;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
@@ -51,7 +52,10 @@ public class DispositionScheduleImpl implements DispositionSchedule,
|
||||
private NodeService nodeService;
|
||||
private RecordsManagementServiceRegistry services;
|
||||
private NodeRef dispositionDefinitionNodeRef;
|
||||
|
||||
/** authentication helper */
|
||||
private AuthenticationUtil authenticationUtil;
|
||||
|
||||
|
||||
private List<DispositionActionDefinition> actions;
|
||||
private Map<String, DispositionActionDefinition> actionsById;
|
||||
|
||||
@@ -61,6 +65,11 @@ public class DispositionScheduleImpl implements DispositionSchedule,
|
||||
|
||||
/** Map of disposition definitions by disposition action name */
|
||||
private Map<String, DispositionActionDefinition> actionsByDispositionActionName;
|
||||
|
||||
public void setAuthenticationUtil(AuthenticationUtil authenticationUtil)
|
||||
{
|
||||
this.authenticationUtil = authenticationUtil;
|
||||
}
|
||||
|
||||
public DispositionScheduleImpl(RecordsManagementServiceRegistry services, NodeService nodeService, NodeRef nodeRef)
|
||||
{
|
||||
@@ -100,13 +109,18 @@ public class DispositionScheduleImpl implements DispositionSchedule,
|
||||
*/
|
||||
public boolean isRecordLevelDisposition()
|
||||
{
|
||||
boolean result = false;
|
||||
Boolean value = (Boolean)this.nodeService.getProperty(this.dispositionDefinitionNodeRef, PROP_RECORD_LEVEL_DISPOSITION);
|
||||
if (value != null)
|
||||
return authenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Boolean>()
|
||||
{
|
||||
result = value.booleanValue();
|
||||
}
|
||||
return result;
|
||||
public Boolean doWork() throws Exception
|
||||
{
|
||||
Boolean value = (Boolean)nodeService.getProperty(dispositionDefinitionNodeRef, PROP_RECORD_LEVEL_DISPOSITION);
|
||||
if (value != null)
|
||||
{
|
||||
return value.booleanValue();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user