[midPoint] How to suppress manager approval of role, when the manager requests the role

Patrik Sidler patrik.sidler at itconcepts.ch
Tue Apr 18 15:21:11 CEST 2023


Hi Community,

I have an issue and do not know how to get this solved.

We have several roles created that have a "Manager Approval" metarole assigned to it.

<role oid="5a9ece69-86ca-4e29-8457-c080287dac35">
    <name>Manager Approval Metarole</name>
    <inducement id="10">
        <policyRule>
            <policyConstraints>
                <assignment id="11">
                    <operation>add</operation>
                </assignment>
            </policyConstraints>
            <policyActions>
                <approval id="12">
                    <compositionStrategy>
                        <order>10</order>
                    </compositionStrategy>
                    <approvalSchema>
                        <stage id="13">
                            <name>Line managers</name>
                            <approverExpression>
                                <script>
                                    <code>midpoint.getManagersOidsExceptUser(object)</code>
                                </script>
                            </approverExpression>
                            <evaluationStrategy>firstDecides</evaluationStrategy>
                            <outcomeIfNoApprovers>reject</outcomeIfNoApprovers>
                        </stage>
                    </approvalSchema>
                </approval>
            </policyActions>
        </policyRule>
    </inducement>
</role>

Whenever one those roles are requested by someone, the manager of the person that receives the role has to approve the assignment.
So far so good.
But now, when my manager requests this role for me, he also has to approve this request.
How can I suppress this approval step when the requester and the approver are the same person?

Thank you in advance for your help.

Best regards,

Patrik Sidler


More information about the midPoint mailing list