[midPoint] Condition for role assignement

Jan Kaspar Caspi at seznam.cz
Sun Jan 7 14:31:39 CET 2018


Hi,




I am trying to create condition for Org assignement. Basicaly user type have
to be a Contractor and must be enabled.

Problem with this cone is an AND operator (&&). with this i cannot save the 
code. I am missing point. In other mappings i am using OR and it works.




See code bellow:

  

 <mapping id="8">

      <name>My Object Template: test assign orgs</name>

      <authoritative>false</authoritative>

      <strength>strong</strength>

      <source>

         <c:path>employeeType</c:path>

      </source>

      <source>

         <c:path>activation/effectiveStatus</c:path>

      </source>

      <expression>

         <value>

            <targetRef oid="bc5ee415-e570-44b3-a676-daee0aa7ab0e" type=
"OrgType"/>

         </value>

      </expression>

      <target>

         <c:path>assignment</c:path>

      </target>

      <condition>

         <script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                 xsi:type="c:ScriptExpressionEvaluatorType">

            <code>

                def tmpStatus = basic.norm(basic.stringify
(effectiveStatus))?.toString();

                log.info ("ORGANIZATION ASSIGNEMENT User Status = " + 
tmpStatus);

        tmpStatus == 'enabled' && employeeType == 'Contractor'

            </code>

         </script>

      </condition>

   </mapping>




Thanks for Help




Jan 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180107/e4001bde/attachment.htm>


More information about the midPoint mailing list