apiVersion: v1
kind: ConfigMap
metadata:
  name: mp-demo-poi-role-user-org-task
  namespace: mp-demo
data:
  201-test-role.xml: |-
    <?xml version="1.0" encoding="UTF-8"?>
    <role xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" oid="00000000-cafe-0001-0000-000000000001">
      <name>test Role</name>
    </role>
  301-test-org-root.xml: |-
    <?xml version="1.0" encoding="UTF-8"?>
    <org xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" oid="00000000-cafe-0002-0000-000000000001">
      <name>test Root Org</name>
    </org>
  302-test-org-member.xml: |-
    <?xml version="1.0" encoding="UTF-8"?>
    <org xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" oid="00000000-cafe-0002-0000-000000000002">
      <name>test member Org</name>
      <assignment id="1">
        <targetRef oid="00000000-cafe-0002-0000-000000000001" relation="org:default" type="OrgType" />
      </assignment>
    </org>
  401-test-user.xml: |-
    <?xml version="1.0" encoding="UTF-8"?>
    <user xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" xmlns:t='http://prism.evolveum.com/xml/ns/public/types-3'>
      <name>test.user.org</name>
      <assignment>
        <targetRef oid="00000000-0000-0000-0000-000000000008" relation="org:default" type="RoleType" />
      </assignment>
      <assignment>
        <targetRef oid="00000000-cafe-0001-0000-000000000001" relation="org:default" type="RoleType" />
      </assignment>
      <assignment>
        <targetRef oid="00000000-cafe-0002-0000-000000000002" relation="org:default" type="OrgType" />
      </assignment>
      <credentials>
        <password>
          <value>
            <t:clearValue>5ecr3t</t:clearValue>
          </value>
        </password>
      </credentials>
    </user>
  402-test-user.xml: |-
    <?xml version="1.0" encoding="UTF-8"?>
    <user xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3" xmlns:t='http://prism.evolveum.com/xml/ns/public/types-3'>
      <name>test.user</name>
      <assignment>
        <targetRef oid="00000000-0000-0000-0000-000000000008" relation="org:default" type="RoleType" />
      </assignment>
      <assignment>
        <targetRef oid="00000000-cafe-0001-0000-000000000001" relation="org:default" type="RoleType" />
      </assignment>
      <credentials>
        <password>
          <value>
            <t:clearValue>5ecr3t</t:clearValue>
          </value>
        </password>
      </credentials>
    </user>
  501-test-recompute-members.xml: >-
    <task xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
    xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
    xmlns:org="http://midpoint.evolveum.com/xml/ns/public/common/org-3"
    xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    oid="00000000-cafe-0003-0000-000000000001">
        <name>Recompute all direct members of Organization test member Org</name>
        <assignment>
            <targetRef oid="00000000-0000-0000-0000-000000000502" relation="org:default" type="c:ArchetypeType" />
        </assignment>
        <taskIdentifier>1646357194695-0-1</taskIdentifier>
        <ownerRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType" />
        <channel>http://midpoint.evolveum.com/xml/ns/public/common/channels-3#user</channel>
        <executionState>runnable</executionState>
        <binding>loose</binding>
        <schedule>
            <misfireAction>executeImmediately</misfireAction>
        </schedule>
        <threadStopAction>restart</threadStopAction>
        <activity>
            <work>
                <recomputation>
                    <objects>
                        <type>c:AssignmentHolderType</type>
                        <query>
                            <q:filter>
                                <q:text> . type UserType and . inOrg "00000000-cafe-0002-0000-000000000002"</q:text>
                            </q:filter>
                        </query>
                    </objects>
                </recomputation>
            </work>
        </activity>
    </task>
