<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2017-2019 Evolveum
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<objects 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:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">

    <org oid="00000000-ee88-6666-0000-c00000000000">
        <name>R0000</name>
        <displayName>Role Catalog</displayName>
        <subtype>roleCatalog</subtype>
    </org>

    <org oid="00000000-ee88-6666-0000-c0000000a000">
        <name>RA000</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000000000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000000000" type="c:OrgType"/>
        </assignment>
        <displayName>Testing Roles</displayName>
        <subtype>roleCategory</subtype>
    </org>

    <org oid="00000000-ee88-6666-0000-c00000001000">
        <name>R1000</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000000000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000000000" type="c:OrgType"/>
        </assignment>
        <displayName>Jira</displayName>
        <subtype>application</subtype>
    </org>

    <role oid="5e1b61b0-07fc-11e7-9035-efe066f95164">
        <name>Jira User</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000001000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000001000" type="c:OrgType"/>
        </assignment>
        <inducement>
            <construction>
                <resourceRef oid="28b699cc-107c-11e6-8277-034841879377"/> <!-- LDAP resource -->
                <kind>account</kind>
                <association>
                    <ref>ri:ldapGroup</ref>
                    <outbound>
                       <expression>
                      <associationTargetSearch>
                         <filter>
                             <q:text>attributes/cn = "jira-users"</q:text>
                         </filter>
                          <searchStrategy>onResource</searchStrategy>
                      </associationTargetSearch>
                       </expression>
                    </outbound>
                 </association>
            </construction>
        </inducement>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="0f780cbc-8f0b-11e6-9b44-ab69ec586751">
        <name>Jira Administrator</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000001000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000001000" type="c:OrgType"/>
        </assignment>
        <inducement>
            <construction>
                <resourceRef oid="28b699cc-107c-11e6-8277-034841879377"/> <!-- LDAP resource -->
                <kind>account</kind>
                <association>
                    <ref>ri:ldapGroup</ref>
                    <outbound>
                       <expression>
                      <associationTargetSearch>
                         <filter>
                             <q:text>attributes/cn = "jira-admins"</q:text>
                         </filter>
                          <searchStrategy>onResource</searchStrategy>
                      </associationTargetSearch>
                       </expression>
                    </outbound>
                 </association>
            </construction>
        </inducement>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="2c43a798-8f0b-11e6-9b0f-fb194f3ae18f">
        <name>Jira Developer</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000001000" type="c:OrgType"/>
        <parentOrgRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000001000" type="c:OrgType"/>
        </assignment>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        </assignment>
        <inducement>
            <construction>
                <resourceRef oid="28b699cc-107c-11e6-8277-034841879377"/> <!-- LDAP resource -->
                <kind>account</kind>
                <association>
                    <ref>ri:ldapGroup</ref>
                    <outbound>
                       <expression>
                      <associationTargetSearch>
                         <filter>
                             <q:text>attributes/cn = "jira-developers"</q:text>
                         </filter>
                         <searchStrategy>onResource</searchStrategy>
                      </associationTargetSearch>
                       </expression>
                    </outbound>
                 </association>
            </construction>
        </inducement>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="41216dda-8f0b-11e6-a17a-1f07efaf95c2">
        <name>Jira Auditor</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000001000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000001000" type="c:OrgType"/>
        </assignment>
        <inducement>
            <construction>
                <resourceRef oid="28b699cc-107c-11e6-8277-034841879377"/> <!-- LDAP resource -->
                <kind>account</kind>
                <association>
                    <ref>ri:ldapGroup</ref>
                    <outbound>
                       <expression>
                      <associationTargetSearch>
                         <filter>
                             <q:text>attributes/cn = "jira-auditors"</q:text>
                         </filter>
                         <searchStrategy>onResource</searchStrategy>
                      </associationTargetSearch>
                       </expression>
                    </outbound>
                 </association>
            </construction>
        </inducement>
        <requestable>false</requestable>
        <subtype>application</subtype>
    </role>

    <org oid="00000000-ee88-6666-0000-c00000002000">
        <name>R2000</name>
        <description>Confluence Wiki</description>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000000000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000000000" type="c:OrgType"/>
        </assignment>
        <displayName>Confluence</displayName>
        <subtype>application</subtype>
    </org>

    <role oid="780ae830-8f0b-11e6-a863-e7df3451c103">
        <name>Confluence Administrator</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000002000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000002000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="86037c86-8f0b-11e6-a73a-1757dbf56cc0">
        <name>Confluence Developer</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000002000" type="c:OrgType"/>
        <parentOrgRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000002000" type="c:OrgType"/>
        </assignment>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="c6c0356a-8f0c-11e6-baa3-c3ac3a73faff">
        <name>Confluence Writer</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000002000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000002000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="98248d38-8f0b-11e6-bbd8-4b23f6af805a">
        <name>Confluence Auditor</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000002000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000002000" type="c:OrgType"/>
        </assignment>
        <requestable>false</requestable>
        <subtype>application</subtype>
    </role>

    <org oid="00000000-ee88-6666-0000-c00000003000">
        <name>R3000</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000000000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000000000" type="c:OrgType"/>
        </assignment>
        <displayName>Gizmo</displayName>
        <subtype>application</subtype>
    </org>

    <role oid="d9c30cec-8f0b-11e6-8e75-7329ce9b2d33">
        <name>Gizmo Administrator</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="e258fe3e-8f0b-11e6-87e6-83d370f065d7">
        <name>Gizmo Developer</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="fdaba04c-8f0b-11e6-8e40-6f6fdaf2c019">
        <name>Gizmo User</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="fe2a8056-8f0b-11e6-b235-b37b608ae0ca">
        <name>Gizmo Reviewer</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="1c263654-8f0c-11e6-90cc-87162e346fbd">
        <name>Gizmo Approver</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="1c597ce4-8f0c-11e6-ab44-0bea62bd6eb3">
        <name>Gizmo Poweruser</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="3a331400-8f0c-11e6-a4b9-877002cc9c74">
        <name>Gizmo Limited User</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="49aae386-8f0c-11e6-a9b0-9f0004f7f9bc">
        <name>Gizmo Whatever</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <parentOrgRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="58201224-8f0c-11e6-8215-bb6e4870178f">
        <name>Gizmo Something</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <parentOrgRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="83894804-8f0c-11e6-a035-13fd9f7bbd3b">
        <name>Gizmo role with longer name</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <parentOrgRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

    <role oid="677f942e-8f0c-11e6-b908-5f5b7c39ba2f">
        <name>Gizmo role that does not really do anything but it has a very long name</name>
        <parentOrgRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        <parentOrgRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c00000003000" type="c:OrgType"/>
        </assignment>
        <assignment>
            <targetRef oid="00000000-ee88-6666-0000-c0000000a000" type="c:OrgType"/>
        </assignment>
        <requestable>true</requestable>
        <subtype>application</subtype>
    </role>

</objects>
