Remove relationships between users and entities


Remove relationships between users and entities

A new lifecycle action must be added to your "users" and "entities" lifecycle files. This action is called up when relationships are deleted from the directory.

You therefore need to add the common action 200 below to your lifecycle files:

  • WEB-INF/param/workflows/udorgunit.xml (example)
  • WEB-INF/param/workflows/user.xml (example)

Ajouter l'action suivante dans la section <common-actions>

<!-- Edit references -->     
<action id="200" name="plugin.user-directory:WORKFLOW_ACTION_EDIT_REFERENCES">     
    <restrict-to>     
        <conditions type="AND">     
            <condition type="avalon">     
                <arg name="role">org.ametys.cms.workflow.LockCondition</arg>     
            </condition>     
            <condition type="avalon">     
                <arg name="role">org.ametys.plugins.contentio.synchronize.workflow.ValidateMetadataSynchronizeCondition</arg>     
                <arg name="validation-step">3</arg>     
            </condition>     
        </conditions>     
    </restrict-to>     
    <results>     
        <result old-status=" " status=" " step="1">     
            <conditions type="AND">     
                <condition type="avalon">     
                    <arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>     
                    <arg name="step">1</arg>     
                </condition>     
            </conditions>     
            <post-functions>     
                <function type="avalon">     
                    <arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>     
                </function>     
            </post-functions>     
        </result>     
        <result old-status=" " status=" " step="2">     
            <conditions type="AND">     
                <condition type="avalon">     
                    <arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>     
                    <arg name="step">2</arg>     
                </condition>     
            </conditions>     
            <post-functions>     
                <function type="avalon">     
                    <arg name="role">org.ametys.cms.workflow.SetCurrentStepIdAndNotifyFunction</arg>     
                </function>     
            </post-functions>     
        </result>     
        <result old-status=" " status=" " step="3">     
            <conditions type="AND">     
                <condition type="avalon">     
                    <arg name="role">org.ametys.cms.workflow.ContentCurrentStepCondition</arg>     
                    <arg name="step">3</arg>     
                </condition>     
            </conditions>     
            <post-functions>     
                <function type="avalon">     
                    <arg name="role">org.ametys.plugins.contentio.synchronize.workflow.ValidateSynchronizedContentFunction</arg>     
                </function>     
                <function type="avalon">     
                    <arg name="role">org.ametys.cms.workflow.ValidationStepFunction</arg>     
                </function>     
            </post-functions>     
        </result>     
        <unconditional-result old-status=" " status=" " step="1"/>     
    </results>     
    <post-functions>     
        <function type="avalon">     
            <arg name="role">org.ametys.cms.workflow.ExtractOutgoingReferencesFunction</arg>     
        </function>     
    </post-functions>     
</action>     

then add its reference for each workflow state (step):

<step id="X" name="....">
    <actions>
        <!-- Edit Action -->
        <common-action id="2" />
        // ...  
        <!-- Edit references -->
        <common-action id="200" />
        <!-- Synchronize Action -->
        <common-action id="800" />
    <actions>
</step>
Back to top