Merge branch 'hotfix-2.3/RM-4095_Fix_Failing_InplaceRecordPermissionTest' into release/V2.3.0.x

This commit is contained in:
Tuna Aksoy
2016-10-03 07:32:34 +01:00
4 changed files with 20 additions and 3 deletions

View File

@@ -259,6 +259,7 @@
depends-on="rmDestroyRecordsScheduledForDestructionCapability"> depends-on="rmDestroyRecordsScheduledForDestructionCapability">
<property name="capabilityService" ref="CapabilityService" /> <property name="capabilityService" ref="CapabilityService" />
<property name="eagerContentStoreCleaner" ref="eagerContentStoreCleaner"/> <property name="eagerContentStoreCleaner" ref="eagerContentStoreCleaner"/>
<property name="inplaceRecordService" ref="InplaceRecordService"/>
<property name="ghostingEnabled"> <property name="ghostingEnabled">
<value>${rm.ghosting.enabled}</value> <value>${rm.ghosting.enabled}</value>
</property> </property>

View File

@@ -29,6 +29,7 @@ import org.alfresco.module.org_alfresco_module_rm.action.RMDispositionActionExec
import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService; import org.alfresco.module.org_alfresco_module_rm.capability.CapabilityService;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition; import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionActionDefinition;
import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule; import org.alfresco.module.org_alfresco_module_rm.disposition.DispositionSchedule;
import org.alfresco.module.org_alfresco_module_rm.record.InplaceRecordService;
import org.alfresco.repo.content.cleanup.EagerContentStoreCleaner; import org.alfresco.repo.content.cleanup.EagerContentStoreCleaner;
import org.alfresco.service.cmr.action.Action; import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition; import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
@@ -55,6 +56,9 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
/** Capability service */ /** Capability service */
private CapabilityService capabilityService; private CapabilityService capabilityService;
/** Inplace record service */
private InplaceRecordService inplaceRecordService;
/** Indicates if ghosting is enabled or not */ /** Indicates if ghosting is enabled or not */
private boolean ghostingEnabled = true; private boolean ghostingEnabled = true;
@@ -74,6 +78,14 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
this.capabilityService = capabilityService; this.capabilityService = capabilityService;
} }
/**
* @param inplaceRecordService inplace record service
*/
public void setInplaceRecordService(InplaceRecordService inplaceRecordService)
{
this.inplaceRecordService = inplaceRecordService;
}
/** /**
* @param ghostingEnabled true if ghosting is enabled, false otherwise * @param ghostingEnabled true if ghosting is enabled, false otherwise
*/ */
@@ -152,6 +164,9 @@ public class DestroyAction extends RMDispositionActionExecuterAbstractBase
{ {
// Add the ghosted aspect // Add the ghosted aspect
getNodeService().addAspect(record, ASPECT_GHOSTED, null); getNodeService().addAspect(record, ASPECT_GHOSTED, null);
// Hide from inplace users to give the impression of destruction
inplaceRecordService.hideRecord(record);
} }
else else
{ {

View File

@@ -500,8 +500,7 @@ public class InplaceRecordPermissionTest extends BaseRMTestCase
* And it's metadata is maintained * And it's metadata is maintained
* Then the inplace users will no longer see the record * Then the inplace users will no longer see the record
*/ */
// FIXME: See RM-4095 public void testDestroyedRecordInplacePermissions()
public void ztestDestroyedRecordInplacePermissions()
{ {
test() test()
.given() .given()

View File

@@ -37,7 +37,9 @@ import org.junit.runners.Suite.SuiteClasses;
HideInplaceRecordTest.class, HideInplaceRecordTest.class,
MoveInplaceRecordTest.class, MoveInplaceRecordTest.class,
ViewRecordTest.class, ViewRecordTest.class,
LinkRecordTest.class LinkRecordTest.class,
CreateInplaceRecordTest.class,
InplaceRecordPermissionTest.class
}) })
public class RecordTestSuite public class RecordTestSuite
{ {