<resource xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3"
        xmlns:c="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: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"
        xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
        xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:bshp="http://midpoint.bshp.edu/xml/ns/bshp"
        oid="b0e37eeb-f88f-4eec-9e61-ae6de33c78b5">
        <name>OpenDJ: Global Directory</name>
        <description>Global Directory Services</description>
        <operationalState>
            <lastAvailabilityStatus>up</lastAvailabilityStatus>
        </operationalState>
        <connectorRef type="c:ConnectorType">
            <filter>
                <q:text>connectorType = "com.evolveum.polygon.connector.ldap.LdapConnector"</q:text>
            </filter>
        </connectorRef>
        <connectorConfiguration xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">
            <icfc:connectorPoolConfiguration>
                <icfc:minEvictableIdleTimeMillis>120000</icfc:minEvictableIdleTimeMillis>
                <icfc:minIdle>1</icfc:minIdle>
                <icfc:maxIdle>10</icfc:maxIdle>
                <icfc:maxObjects>10</icfc:maxObjects>
                <icfc:maxWait>150000</icfc:maxWait>
            </icfc:connectorPoolConfiguration>
            <icfc:producerBufferSize>100</icfc:producerBufferSize>
            <icfc:timeouts>
                <icfc:create>-1</icfc:create>
                <icfc:get>-1</icfc:get>
                <icfc:update>-1</icfc:update>
                <icfc:delete>-1</icfc:delete>
                <icfc:test>-1</icfc:test>
                <icfc:scriptOnConnector>-1</icfc:scriptOnConnector>
                <icfc:scriptOnResource>-1</icfc:scriptOnResource>
                <icfc:authentication>-1</icfc:authentication>
                <icfc:search>-1</icfc:search>
                <icfc:validate>-1</icfc:validate>
                <icfc:sync>-1</icfc:sync>
                <icfc:schema>-1</icfc:schema>
            </icfc:timeouts>
            <icfc:resultsHandlerConfiguration>
                <icfc:enableNormalizingResultsHandler>false</icfc:enableNormalizingResultsHandler>
                <icfc:enableFilteredResultsHandler>false</icfc:enableFilteredResultsHandler>
                <icfc:enableAttributesToGetSearchResultsHandler>false</icfc:enableAttributesToGetSearchResultsHandler>
            </icfc:resultsHandlerConfiguration>
            <icfc:configurationProperties xmlns:gen715="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-ldap/com.evolveum.polygon.connector.ldap.LdapConnector">
                <gen715:host>
                    <expression>
                        <const>resOpenDJhost</const>
                    </expression>
                </gen715:host>
                <gen715:port>
                    <expression>
                        <const>resOpenDJport</const>
                    </expression>
                </gen715:port>
                <gen715:connectionSecurity>ssl</gen715:connectionSecurity>
                <gen715:bindDn>
                    <expression>
                        <const>resOpenDJbinddn</const>
                    </expression>
                </gen715:bindDn>
                <gen715:bindPassword>
                    <expression>
                        <const>resOpenDJbindpw</const>
                    </expression>
                </gen715:bindPassword>
                <gen715:baseContext>
                    <expression>
                        <const>resOpenDJbasedn</const>
                    </expression>
                </gen715:baseContext>
                <gen715:pagingStrategy>auto</gen715:pagingStrategy>
                <gen715:pagingBlockSize>500</gen715:pagingBlockSize>
                <gen715:vlvSortAttribute>entryUUID</gen715:vlvSortAttribute>
                <gen715:vlvSortOrderingRule>2.5.13.3</gen715:vlvSortOrderingRule>
                <gen715:operationalAttributes>ds-pwp-account-disabled</gen715:operationalAttributes>
                <gen715:operationalAttributes>isMemberOf</gen715:operationalAttributes>
            </icfc:configurationProperties>
        </connectorConfiguration>
        <schema>
            <generationConstraints>
                <generateObjectClass>ri:inetOrgPerson</generateObjectClass>
                <generateObjectClass>ri:groupOfUniqueNames</generateObjectClass>
                <generateObjectClass>ri:groupOfNames</generateObjectClass>
                <generateObjectClass>ri:organizationalUnit</generateObjectClass>
                <generateObjectClass>ri:bshpPerson</generateObjectClass>
                <generateObjectClass>ri:bshpGroup</generateObjectClass>
                <generateObjectClass>ri:eduPerson</generateObjectClass>
            </generationConstraints>
		</schema>
        <schemaHandling>
            <objectType>
                <displayName>Registry Account</displayName>
                <default>true</default>
                <objectClass>ri:inetOrgPerson</objectClass>
                <auxiliaryObjectClass>ri:bshpPerson</auxiliaryObjectClass>
                <auxiliaryObjectClass>ri:eduPerson</auxiliaryObjectClass>
                <attribute>
                    <c:ref>ri:dn</c:ref>
                    <displayName>Distinguished Name</displayName>
                    <limitations>
                        <minOccurs>0</minOccurs>
                        <access>
                            <read>true</read>
                            <add>true</add>
                            <modify>true</modify>
                        </access>
                    </limitations>
                    <matchingRule>mr:stringIgnoreCase</matchingRule>
                    <outbound>
                        <source>
                            <c:path>$focus/name</c:path>
                        </source>
                        <expression>
                            <script>
                                <code>'uid=' + name + iterationToken + ',ou=people,dc=bshp,dc=edu'</code>
                            </script>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:entryUUID</c:ref>
                    <limitations>
                        <access>
                            <read>true</read>
                        </access>
                    </limitations>
                </attribute>
                <attribute>
                    <c:ref>ri:cn</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/fullName</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:sn</c:ref>
                    <limitations>
                        <minOccurs>0</minOccurs>
                    </limitations>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/familyName</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:givenName</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/givenName</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:initials</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/additionalName</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:displayName</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/fullName</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:ou</c:ref>
                    <limitations>
                        <minOccurs>0</minOccurs>
                        <maxOccurs>1</maxOccurs>
                    </limitations>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/organization</c:path>
                        </source>
                        <expression>
                            <script>
                                <code>basic.uc(basic.stringify(organization))</code>
                            </script>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:uid</c:ref>
                    <limitations>
                        <access>
                            <read>true</read>
                            <add>true</add>
                            <modify>true</modify>
                        </access>
                    </limitations>
                    <matchingRule>mr:stringIgnoreCase</matchingRule>
                    <outbound>
                        <source>
                            <c:path>$focus/name</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:description</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/description</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:mail</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/emailAddress</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:telephoneNumber</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/telephoneNumber</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:mobile</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:mobilePhone</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonCountry</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/locale</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:l</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/locality</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:employeeType</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/subtype</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:employeeNumber</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/employeeNumber</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonDepartment</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/costCenter</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPrimaryAffiliation</c:ref>
                    <limitations>
                        <minOccurs>0</minOccurs>
                        <maxOccurs>1</maxOccurs>
                    </limitations>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:bshpPrimaryAffiliation</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:eduPersonScopedAffiliation</c:ref>
                    <limitations>
                        <minOccurs>0</minOccurs>
                        <maxOccurs>1</maxOccurs>
                    </limitations>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <name>tmpAffiliation</name>
                            <c:path>$focus/extension/bshp:bshpPrimaryAffiliation</c:path>
                        </source>
                        <expression>
                            <script>
                                <code>tmpAffiliation + '@bshp.edu'</code>
                            </script>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:eduPersonPrincipalname</c:ref>
                    <limitations>
                        <minOccurs>0</minOccurs>
                        <maxOccurs>1</maxOccurs>
                    </limitations>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/name</c:path>
                        </source>
                        <expression>
                            <script>
                                <code>name + '@bshp.edu'</code>
                            </script>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonAffiliation</c:ref>
                    <limitations>
                        <minOccurs>0</minOccurs>
                        <maxOccurs>1</maxOccurs>
                    </limitations>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:bshpPrimaryAffiliation</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:eduPersonEntitlement</c:ref>
                    <tolerant>false</tolerant>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:eduPersonEntitlement</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonOtherEmail</c:ref>
                    <limitations>
                        <minOccurs>0</minOccurs>
                        <maxOccurs>1</maxOccurs>
                    </limitations>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:otherMailbox</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonDOBString</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:bshpPersonDOBString</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonGender</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:gender</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonCitizen</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:citizen</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonLevel</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:academicLevel</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonDivision</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:division</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonCampus</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:campus</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonStateID</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:bshpPersonStateID</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonPrivacy</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:bshpPersonPrivacy</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonSelfClaimed</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:bshpPersonSelfClaimed</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonCourses</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:courseMembership</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpPersonMobilePhone</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/extension/bshp:mobilePhone</c:path>
                        </source>
                    </outbound>
                </attribute>
                <association>
                    <c:ref>ri:registryGroup</c:ref>
                    <displayName>Group Memberships</displayName>
                    <tolerant>false</tolerant>
                    <kind>entitlement</kind>
                    <intent>registryGroup</intent>
                    <direction>objectToSubject</direction>
                    <associationAttribute>ri:member</associationAttribute>
                    <valueAttribute>ri:dn</valueAttribute>
                    <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
                </association>
                <association>
                    <c:ref>ri:registryCourse</c:ref>
                    <displayName>Course Memberships</displayName>
                    <tolerant>false</tolerant>
                    <kind>entitlement</kind>
                    <intent>registryCourse</intent>
                    <direction>objectToSubject</direction>
                    <associationAttribute>ri:member</associationAttribute>
                    <valueAttribute>ri:dn</valueAttribute>
                    <explicitReferentialIntegrity>false</explicitReferentialIntegrity>
                </association>
                <iteration>
                    <maxIterations>999</maxIterations>
                    <tokenExpression>
                        <script>
                            <code>
                                if (iteration == 0) {
                                    return "";
                                } else {
                                    return "" + (iteration + 1);
                                }
                            </code>
                        </script>
                    </tokenExpression>
                </iteration>
                <protected>
                    <filter>
                        <q:text>attributes/ri:dn =[distinguishedName] "uid=idm,ou=accounts,dc=bshp,dc=edu"</q:text>
                    </filter>
                </protected>
                <activation>
                    <administrativeStatus>
                        <outbound>
                            <strength>strong</strength>
                            <expression>
                                <asIs/>
                            </expression>
                        </outbound>
                        <inbound>
                            <strength>weak</strength>
                            <expression>
                                <asIs/>
                            </expression>
                        </inbound>
                    </administrativeStatus>
                </activation>
                <credentials>
                    <password>
                        <outbound>
                            <expression>
                                <asIs/>
                            </expression>
                        </outbound>
                        <inbound>
                            <strength>weak</strength>
                            <expression>
                                <generate/>
                            </expression>
                        </inbound>
                    </password>
                </credentials>
            </objectType>
            <objectType>
                <kind>entitlement</kind>
                <intent>registryGroup</intent>
                <displayName>Registry Group</displayName>
                <default>true</default>
                <objectClass>ri:groupOfNames</objectClass>
                <auxiliaryObjectClass>ri:bshpGroup</auxiliaryObjectClass>
                <baseContext>
                    <objectClass>ri:groupOfNames</objectClass>
                    <filter>
                        <q:text>attributes/dn = "ou=groups,dc=bshp,dc=edu"</q:text>
                    </filter>
                </baseContext>
                <attribute>
                    <c:ref>ri:dn</c:ref>
                    <matchingRule>mr:stringIgnoreCase</matchingRule>
                    <outbound>
                        <source>
                            <c:path>$focus/identifier</c:path>
                        </source>
                        <expression>
                            <script>
                                <code>'cn=' + identifier + ',ou=groups,dc=bshp,dc=edu'</code>
                            </script>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:cn</c:ref>
                    <matchingRule>mr:stringIgnoreCase</matchingRule>
                    <outbound>
                        <source>
                            <c:path>$focus/identifier</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:description</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>description</c:path>
                        </source>
                    </outbound>
                </attribute>
            </objectType>
            <objectType>
                <kind>entitlement</kind>
                <intent>registryCourse</intent>
                <displayName>Registry Course</displayName>
                <default>false</default>
                <objectClass>ri:groupOfNames</objectClass>
                <auxiliaryObjectClass>ri:bshpGroup</auxiliaryObjectClass>
                <baseContext>
                    <objectClass>ri:groupOfNames</objectClass>
                    <filter>
                        <q:text>attributes/dn = "ou=courses,dc=bshp,dc=edu"</q:text>
                    </filter>
                </baseContext>
                <attribute>
                    <c:ref>ri:dn</c:ref>
                    <matchingRule>mr:stringIgnoreCase</matchingRule>
                    <outbound>
                        <source>
                            <c:path>$focus/name</c:path>
                        </source>
                        <expression>
                            <script>
                                <code>
                                    'cn=' + name + ',ou=courses,dc=bshp,dc=edu'
                                </code>
                            </script>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:cn</c:ref>
                    <matchingRule>mr:stringIgnoreCase</matchingRule>
                    <outbound>
                        <source>
                            <c:path>$focus/name</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:description</c:ref>
                    <outbound>
                        <source>
                            <c:path>$focus/description</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:mail</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/mailDomain</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:owner</c:ref>
                    <tolerant>false</tolerant>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <name>coordFaculty</name>
                            <c:path>$focus/extension/bshp:coordEmailAddress</c:path>
                        </source>
                        <expression>
                            <script>
                                <code>
                                     if (!basic.isEmpty(coordFaculty) &amp;&amp; coordFaculty.size() &gt; 0) {
                                          leadUser = coordFaculty.split("\\@")[0];
                                          return 'uid=' + leadUser + ',ou=people,dc=bshp,dc=edu';
                                      }
                                  </code>
                            </script>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpGroupDisplayName</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/name</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpGroupModerated</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <expression>
                            <value>True</value>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpGroupPrivacy</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <expression>
                            <value>True</value>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpGroupCourse</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <expression>
                            <value>True</value>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:bshpGroupDepartment</c:ref>
                    <outbound>
                        <strength>strong</strength>
                        <source>
                            <c:path>$focus/costCenter</c:path>
                        </source>
                    </outbound>
                </attribute>
            </objectType>
            <objectType>
                <kind>generic</kind>
                <intent>ou</intent>
                <objectClass>ri:organizationalUnit</objectClass>
                <attribute>
                    <c:ref>ri:dn</c:ref>
                    <matchingRule>mr:stringIgnoreCase</matchingRule>
                    <outbound>
                        <source>
                            <c:path>name</c:path>
                        </source>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:ou</c:ref>
                    <matchingRule>mr:stringIgnoreCase</matchingRule>
                    <outbound>
                        <source>
                            <c:path>displayName</c:path>
                        </source>
                        <expression>
                            <script>
                                <code>basic.norm(displayName)</code>
                            </script>
                        </expression>
                    </outbound>
                </attribute>
                <attribute>
                    <c:ref>ri:description</c:ref>
                    <outbound>
                        <source>
                            <c:path>description</c:path>
                        </source>
                    </outbound>
                </attribute>
            </objectType>
        </schemaHandling>
        <capabilities>
            <configured xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
                <cap:activation>
                    <cap:status>
                        <cap:attribute>ri:ds-pwp-account-disabled</cap:attribute>
                        <cap:enableValue/>
                        <cap:enableValue>false</cap:enableValue>
                        <cap:disableValue>true</cap:disableValue>
                    </cap:status>
                </cap:activation>
            </configured>
        </capabilities>
        <projection>
            <assignmentPolicyEnforcement>full</assignmentPolicyEnforcement>
        </projection>
        <synchronization>
            <objectSynchronization>
                <objectClass>ri:inetOrgPerson</objectClass>
                <kind>account</kind>
                <intent>default</intent>
                <focusType>c:UserType</focusType>
                <enabled>true</enabled>
                <correlation>
                    <q:equal>
                        <q:path>c:name</q:path>
                        <expression>
                            <path>$c:shadow/c:attributes/ri:uid</path>
                        </expression>
                    </q:equal>
                </correlation>
                <reaction>
                    <situation>linked</situation>
                    <synchronize>true</synchronize>
                </reaction>
                <reaction>
                    <situation>deleted</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
                    </action>
                </reaction>
                <reaction>
                    <situation>unlinked</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
                    </action>
                </reaction>
                <reaction>
                    <situation>unmatched</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
                    </action>
                </reaction>
            </objectSynchronization>
            <objectSynchronization>
                <objectClass>ri:groupOfNames</objectClass>
                <kind>entitlement</kind>
                <intent>registryGroup</intent>
                <focusType>c:RoleType</focusType>
                <enabled>true</enabled>
                <condition>
                    <script>
                        <code>
                             crsGrp = basic.getAttributeValue(shadow, 'http://midpoint.evolveum.com/xml/ns/public/resource/instance-3', 'bshpGroupCourse');
                          objClass = basic.getAttributeValue(shadow, 'http://midpoint.evolveum.com/xml/ns/public/resource/instance-3', 'objectClass');
                          return (crsGrp != 'True' &amp;&amp; objClass == 'groupOfNames')
                       </code>
                    </script>
                </condition>
                <correlation>
                    <q:equal>
                        <q:path>c:identifier</q:path>
                        <expression>
                            <path>$c:shadow/c:attributes/ri:cn</path>
                        </expression>
                    </q:equal>
                </correlation>
                <reaction>
                    <situation>linked</situation>
                    <synchronize>true</synchronize>
                </reaction>
                <reaction>
                    <situation>deleted</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
                    </action>
                </reaction>
                <reaction>
                    <situation>unlinked</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
                    </action>
                </reaction>
                <reaction>
                    <situation>unmatched</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
                    </action>
                </reaction>
            </objectSynchronization>
            <objectSynchronization>
                <objectClass>ri:groupOfNames</objectClass>
                <kind>entitlement</kind>
                <intent>registryCourse</intent>
                <focusType>c:OrgType</focusType>
                <enabled>true</enabled>
                <condition>
                    <script>
                        <code>
                          tmp = basic.getAttributeValue(shadow, 'http://midpoint.evolveum.com/xml/ns/public/resource/instance-3', 'bshpGroupCourse');
                          return (tmp == 'True')
                       </code>
                    </script>
                </condition>
                <correlation>
                    <q:equal>
                        <q:path>c:identifier</q:path>
                        <expression>
                            <path>$c:shadow/c:attributes/ri:cn</path>
                        </expression>
                    </q:equal>
                </correlation>
                <reaction>
                    <situation>linked</situation>
                    <synchronize>true</synchronize>
                </reaction>
                <reaction>
                    <situation>deleted</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
                    </action>
                </reaction>
                <reaction>
                    <situation>unlinked</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
                    </action>
                </reaction>
                <reaction>
                    <situation>unmatched</situation>
                    <synchronize>true</synchronize>
                    <action>
                        <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
                    </action>
                </reaction>
            </objectSynchronization>
        </synchronization>
    </resource>
