Cette page ne doit être appliquée que si le script vous demande de passer la migration manuelle code.20241011.ODF-Pilotage.DeleteMCCPdfWorkflowAction
Afin de corriger la vérification des droits lors de la suppression des documents de MCC validées sur les conteneurs, nous utilisons maintenant la nouvelle action de workflow 222227 . Il est donc nécessaire de vérifier le cycle de vie "Conteneur" s'il est surchargé. Vous le retrouverez dans à l'emplacement suivant : WEB-INF/param/workflows/container.xml .
Dans ces fichiers, il faut ajouter l'action 222227 au niveau des common-actions si elle n'est pas présente :
Oups ! La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<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> Ensuite, il faut ajouter l'appel à l'action 222227 chaque fois que l'action 222222 est présente dans le fichier de cycle de vie :
Oups ! La copie dans le presse papier a échouée. Ouvrez le code et copier-le manuellement.<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 -->