This page should only be used if the script asks you to pass the manual migration code.20241011.ODF -Pilotage .DeleteMCCPdfWorkflowAction
In order to correct the rights check when deleting validated MCC documents on containers, we now use the new workflow action 222227 . It is therefore necessary to check the "Container" lifecycle if it is overloaded. You'll find it in the following location: WEB-INF/param/workflows/container.xml .
In these files, you must add the 222227 action to the common-share level if it is not already present:
Oops! Copy to clipboard failed. Open the code and copy it manually.<action id="222227" name="plugin.odf-pilotage:WORKFLOW_ACTION_CONTAINER_ADD_MCC_DOCUMENT">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ContentCheckRightsCondition</arg>
<arg name="right">ODF_Pilotage_Delete_MCC_Validated_Rights</arg>
</condition>
</conditions>
</restrict-to>
<pre-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.EditContentFunction</arg>
<arg name="notify">false</arg>
</function>
</pre-functions>
<results>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.plugins.workflow.component.AmetysObjectCurrentStepCondition</arg>
<arg name="object-key">org.ametys.cms.repository.Content</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentFunction</arg>
<arg name="major">false</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1">
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.CreateVersionFunction</arg>
</function>
</post-functions>
</unconditional-result>
</results>
</action> <action id="222227" name="plugin.odf-pilotage:WORKFLOW_ACTION_CONTAINER_ADD_MCC_DOCUMENT">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ContentCheckRightsCondition</arg>
<arg name="right">ODF_Pilotage_Delete_MCC_Validated_Rights</arg>
</condition>
</conditions>
</restrict-to>
<pre-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.EditContentFunction</arg>
<arg name="notify">false</arg>
</function>
</pre-functions>
<results>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.plugins.workflow.component.AmetysObjectCurrentStepCondition</arg>
<arg name="object-key">org.ametys.cms.repository.Content</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentFunction</arg>
<arg name="major">false</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1">
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.CreateVersionFunction</arg>
</function>
</post-functions>
</unconditional-result>
</results>
</action> Voir le code
<action id="222227" name="plugin.odf-pilotage:WORKFLOW_ACTION_CONTAINER_ADD_MCC_DOCUMENT">
<restrict-to>
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.LockCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentCondition</arg>
</condition>
<condition type="avalon">
<arg name="id">org.ametys.cms.workflow.ContentCheckRightsCondition</arg>
<arg name="right">ODF_Pilotage_Delete_MCC_Validated_Rights</arg>
</condition>
</conditions>
</restrict-to>
<pre-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.EditContentFunction</arg>
<arg name="notify">false</arg>
</function>
</pre-functions>
<results>
<result old-status=" " status=" " step="3">
<conditions type="AND">
<condition type="avalon">
<arg name="id">org.ametys.plugins.workflow.component.AmetysObjectCurrentStepCondition</arg>
<arg name="object-key">org.ametys.cms.repository.Content</arg>
<arg name="step">3</arg>
</condition>
</conditions>
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidateContentFunction</arg>
<arg name="major">false</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.ValidationStepFunction</arg>
</function>
</post-functions>
</result>
<unconditional-result old-status=" " status=" " step="1">
<post-functions>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>
</function>
<function type="avalon">
<arg name="id">org.ametys.cms.workflow.CreateVersionFunction</arg>
</function>
</post-functions>
</unconditional-result>
</results>
</action> Next, add the call to action 222227 whenever action 222222 is present in the lifecycle file:
Oops! Copy to clipboard failed. Open the code and copy it manually.<common-action id="222222" /> <!-- Ligne existante -->
<common-action id="222227" /> <!-- Ligne ajoutée --> <common-action id="222222" /> <!-- Ligne existante -->
<common-action id="222227" /> <!-- Ligne ajoutée -->
<common-action id="222222" /> <!-- Ligne existante -->
<common-action id="222227" /> <!-- Ligne ajoutée -->