<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi,
    <p>I need in an authorization to know which value is actually
      presented by
      <q:path>extension/listeAffectations</q:path>.</p>
    <p>The problem is that "extension/listeAffectations" in users
      accounts is a multi-valued field, and I need to compare this value
      presented by the authorisation with another in a mutivalued field
      in the "actor" account. Looking for the good groovy code.<br>
    </p>
        <authorization><br>
            <name>delegations-users-read-modify</name><br>
           
<action><a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read">http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read</a></action><br>
           
<action><a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#modify">http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#modify</a></action><br>
    <br>
            <object><br>
                <type>UserType</type><br>
                <filter><br>
                    <q:and><br>
                        </q:equal><br>
                           
    <q:path>extension/listeAffectations</q:path><br>
                            <expression><br>
                                <script><br>
                                    <code><br>
                                        // the groovy code to know which
    value is actually presented<br>
                                        // by
    <q:path>extension/listeAffectations</q:path><br>
                                        // to the variable actor or
    subject<br>
                                        return
    the_good_choosen_value_depending_of_context;<br>
                                    </code><br>
                                </script><br>
                            </expression><br>
                        </q:equal><br>
                    </q:and><br>
                </filter><br>
            </object><br>
    <br>
            <item>emailAddress</item><br>
            <item>extension/telephonePersonnel</item><br>
        </authorization><br>
    <br>
    <p><br>
    </p>
    <p>I checked with "this.binding.variables.each {k,v ->
      log.info("{} = {}", k, v)};" to find this data... but nothing
      easy.<br>
    </p>
    <p>I know that maybe it's not the way that midpoint is working, but
      it's for a very specific use and I can't use an organization
      structure.<br>
    </p>
    <p>any help ?</p>
    <p>thanks a lot</p>
    <div class="moz-signature"><br>
      -------
      <br>
      <b>Pascal PÉRICHON</b><br>
      Responsable du référentiel d'identités<br>
      Direction des systèmes d'information et du numérique<br>
      Université de Paris<br>
      Bâtiment les Grands Moulins - Aile A - Bureau 721A<br>
      5 rue Thomas Mann 75013 Paris<br>
    </div>
  </body>
</html>