RM-1099 (Refactor Transfer and Accession reports)

* Created a base report action and splitted the file report action to transfer report action and destruction report action, so that capability checks can be run for those actions separately and each action can pass additional properties to the report template model

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@58444 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2013-11-30 21:26:05 +00:00
parent 9631d4644c
commit 76d7febf71
6 changed files with 192 additions and 19 deletions

View File

@@ -39,12 +39,11 @@
</tr>
<tr>
<td class="label">${message("file.report.performed.by")}:</td>
<td> ${node.properties["cm:creator"]?html}</td>
<td>${node.properties["cm:creator"]?html}</td>
</tr>
<tr>
<td class="label">${message("file.report.disposition.authority")}:</td>
<#-- FIXME: Disposition Authority - Check, escape -->
<td></td>
<td>${properties["dispositionAuthority"]?html}</td>
</tr>
</table>
<h2>${message("file.report.transferred.items")}</h2>

View File

@@ -93,22 +93,29 @@
<!-- Report Actions -->
<bean id="fileReport_proxy" parent="rmProxyAction" >
<bean id="baseReportAction" abstract="true" parent="rmAction">
<property name="reportService" ref="reportService" />
</bean>
<bean id="transferReportAction"
class="org.alfresco.module.org_alfresco_module_rm.report.action.TransferReportAction"
parent="baseReportAction" />
<bean id="transferReportAction_proxy" parent="rmProxyAction" >
<property name="target">
<ref bean="fileReport"/>
<ref bean="transferReportAction"/>
</property>
<property name="interceptorNames">
<list>
<idref bean="fileReport_security"/>
<idref bean="transferReportAction_security"/>
</list>
</property>
</bean>
<bean id="fileReport_security" class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor" parent="actionSecurity">
<bean id="transferReportAction_security" class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor" parent="actionSecurity">
<property name="objectDefinitionSource">
<value>
<!-- FIXME: Find a way to check the capabilities. Do we really need several classes or can we use one class -->
<!-- org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.execute=RM_CAP.0.rma:filePlanComponent.FileDestructionReport -->
<!-- FIXME: Which capability do we need to check? -->
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.execute=RM_ALLOW
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.*=RM_ALLOW
org.alfresco.repo.action.executer.ActionExecuter.*=RM_ALLOW
@@ -116,10 +123,29 @@
</property>
</bean>
<bean id="fileReport"
class="org.alfresco.module.org_alfresco_module_rm.report.action.FileReportAction"
parent="rmAction">
<property name="reportService" ref="ReportService" />
<bean id="destructionReportAction"
class="org.alfresco.module.org_alfresco_module_rm.report.action.DestructionReportAction"
parent="baseReportAction" />
<bean id="destructionReportAction_proxy" parent="rmProxyAction" >
<property name="target">
<ref bean="destructionReportAction"/>
</property>
<property name="interceptorNames">
<list>
<idref bean="destructionReportAction_security"/>
</list>
</property>
</bean>
<bean id="destructionReportAction_security" class="org.alfresco.repo.security.permissions.impl.acegi.MethodSecurityInterceptor" parent="actionSecurity">
<property name="objectDefinitionSource">
<value>
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.execute=RM_CAP.0.rma:filePlanComponent.FileDestructionReport
org.alfresco.module.org_alfresco_module_rm.action.RecordsManagementAction.*=RM_ALLOW
org.alfresco.repo.action.executer.ActionExecuter.*=RM_ALLOW
</value>
</property>
</bean>
</beans>