This page should only be used if script asks you to pass the manual migration code.20241011.ODF.DeleteEducationalBookletProgramItemWorkflowAction
In order to correct the rights check when deleting course catalog archives on training elements, we now use the new workflow action 2227 . It is therefore necessary to check which lifecycles overload the "Training", "Course", "Container" and "ELP" lifecycles. If these lifecycles are overloaded, they can be found in the WEB-INF/param/workflows folder under the following names:
container.xml race.xml program.xml subprogram.xml In these files, you must add action 2227 to the common-share level if it is not already present:
Oops! Copy to clipboard failed. Open the code and copy it manually.<!-- Delete educational booklet document -->
<action id="2227" name="plugin.odf:WORKFLOW_ACTION_PROGRAM_ITEM_EDUCATIONAL_BOOKLET_DELETE">
<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_Rights_Educational_Booklet_Delete</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> <!-- Delete educational booklet document -->
<action id="2227" name="plugin.odf:WORKFLOW_ACTION_PROGRAM_ITEM_EDUCATIONAL_BOOKLET_DELETE">
<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_Rights_Educational_Booklet_Delete</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
<!-- Delete educational booklet document -->
<action id="2227" name="plugin.odf:WORKFLOW_ACTION_PROGRAM_ITEM_EDUCATIONAL_BOOKLET_DELETE">
<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_Rights_Educational_Booklet_Delete</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 2227 whenever action 2222 is present in the lifecycle file:
Oops! Copy to clipboard failed. Open the code and copy it manually.<common-action id="2222" /> <!-- Ligne existante -->
<common-action id="2227" /> <!-- Ligne ajoutée --> <common-action id="2222" /> <!-- Ligne existante -->
<common-action id="2227" /> <!-- Ligne ajoutée -->
<common-action id="2222" /> <!-- Ligne existante -->
<common-action id="2227" /> <!-- Ligne ajoutée -->