<role xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
      xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
      xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
      xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
      xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
      xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3"
      xmlns:ext="http://midpoint.evolveum.com/xml/ns/story/unix-1"
      xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
     >
   <name>Assignemnt &amp; Inducement UNIX Group Metarole</name>
   <description>Create group in the unix, assign this group to the user when role with this metarole is assigned.</description>

   <inducement id="1">
      <construction>
         <resourceRef oid="017a3bc5-e102-4baa-bf93-369a90ec29dd" type="c:ResourceType"><!-- Unix Resource --></resourceRef>
         <kind>entitlement</kind>
         <intent>unixGroup</intent>
         <attribute>
            <c:ref>icfs:name</c:ref>
            <matchingRule>mr:stringIgnoreCase</matchingRule>
            <outbound>
               <source>
                  <name>groupName</name>
                  <c:path>extension/ext:groupName</c:path>
               </source>
            </outbound>
         </attribute>
         <attribute>
            <c:ref>ri:permissions</c:ref>
            <outbound>
               <source>
                  <name>permissions</name>
                  <c:path>extension/ext:permissions</c:path>
               </source>
            </outbound>
         </attribute>
      </construction>
   </inducement>
   <inducement id="2">
      <construction>
         <resourceRef oid="017a3bc5-e102-4baa-bf93-369a90ec29dd" type="c:ResourceType"><!-- Unix Resource --></resourceRef>
         <kind>account</kind>
         <intent>default</intent>
         <association>
            <c:ref>ri:unixGroup</c:ref>
            <outbound>
               <strength>strong</strength>
               <expression>
                  <associationFromLink>
                     <projectionDiscriminator>
                        <kind>entitlement</kind>
                        <intent>unixGroup</intent>
                     </projectionDiscriminator>
                  </associationFromLink>
               </expression>
            </outbound>
         </association>
      </construction>
      <order>2</order>
      <focusType>UserType</focusType>
   </inducement>
</role>
