Skip to content
Permalink
Browse files

Add support for async group rename

This requires midPoint 4.1-M2 that has been uploaded today.
Also fixing the name of user recomputation task.
  • Loading branch information
mederly committed Jan 28, 2020
1 parent eddc1d3 commit 71280348a87839d2b72cd2d85b6f7e838f4d0660
@@ -1,5 +1,5 @@
<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: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" oid="83a737ea-5eb7-4e78-b431-331cccf02354">
<name>User recomputing with bucket</name>
<name>User recomputation</name>
<extension xmlns:mext="http://midpoint.evolveum.com/xml/ns/public/model/extension-3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xsi:type="c:ExtensionType">
<mext:objectType>c:UserType</mext:objectType>
<mext:tracingInterval>200</mext:tracingInterval>
@@ -156,6 +156,19 @@
delta = null
}
return UcfChangeUtil.create(GROUP_OBJECT_CLASS, identifiers, delta, prismContext)
} else if (eventType == 'GROUP_UPDATE') {
groupName = esbEvent['name']
groupId = esbEvent['id']
isExported = matches(groupName, groupIncludePattern, groupExcludePattern)
if (!isExported) {
log.info('Irrelevant group add/delete event, ignoring it: {}', groupName)
return null
}
// Notification-only change: so we fetch current state of this group and synchronize it fully
identifiers = new HashMap()
identifiers.put(ATTR_NAME, groupName)
identifiers.put(ATTR_UUID, groupId)
return UcfChangeUtil.create(GROUP_OBJECT_CLASS, identifiers, null, prismContext)
} else {
log.warn('Unsupported event type: {} -> {}', eventType, esbEvent)
return null
@@ -42,6 +42,11 @@
<rest:subjectSource>ldap</rest:subjectSource>
<rest:ignoreSslValidation>true</rest:ignoreSslValidation>
</icfc:configurationProperties>
<icfc:resultsHandlerConfiguration>
<icfc:enableNormalizingResultsHandler>false</icfc:enableNormalizingResultsHandler>
<icfc:enableFilteredResultsHandler>true</icfc:enableFilteredResultsHandler>
<icfc:enableAttributesToGetSearchResultsHandler>false</icfc:enableAttributesToGetSearchResultsHandler>
</icfc:resultsHandlerConfiguration>
</connectorConfiguration>
<additionalConnector>
<name>AMQP async update connector</name>
@@ -152,6 +157,18 @@
<reaction>
<situation>linked</situation>
<channel>http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#asyncUpdate</channel>
<condition>
<script>
<code>import com.evolveum.midpoint.prism.path.ItemPath
import com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType

// member-only updates should _NOT_ be synchronized
resourceObjectDelta != null &amp;&amp; resourceObjectDelta.isModify() &amp;&amp;
resourceObjectDelta.modifications.size() == 1 &amp;&amp;
ItemPath.create(ShadowType.F_ATTRIBUTES, 'member').equivalent(resourceObjectDelta.modifications.iterator().next().path)
</code>
</script>
</condition>
<synchronize>false</synchronize>
</reaction>
<reaction>
@@ -287,7 +287,7 @@ load ../../../library
if [ -e $BATS_TMPDIR/not-started ]; then skip 'not started'; fi

add_object tasks midpoint-objects-manual/tasks/task-recomputation-users.xml
search_and_check_object tasks "User recomputing with bucket"
search_and_check_object tasks "User recomputation"
wait_for_task_completion 83a737ea-5eb7-4e78-b431-331cccf02354 6 10
assert_task_success 83a737ea-5eb7-4e78-b431-331cccf02354
}

0 comments on commit 7128034

Please sign in to comment.
You can’t perform that action at this time.