Skip to content

Commit

Permalink
Map Grouper groups to midPoint orgs
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Mar 26, 2019
1 parent 4a45e20 commit 7f20946
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<objectTemplate xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
oid="e2a6193a-8981-4143-9da1-9a7b32c0b819">
<name>template-org-group</name>
<mapping>
<strength>strong</strength>
<expression>
<assignmentTargetSearch>
<targetType>RoleType</targetType>
<oid>48e231be-8474-4ed0-a85e-6acf4c5e8d52</oid> <!-- metarole-group -->
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
</mapping>

</objectTemplate>
65 changes: 65 additions & 0 deletions demo/complex/midpoint-objects/objectTemplates/template-user.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0"?>
<objectTemplate xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" oid="8098b124-c20c-4965-8adf-e528abedf7a4">
<name>User Template</name>
<mapping>
<strength>strong</strength>
<source>
<path>extension/grouper_group</path>
</source>
<expression>
<assignmentTargetSearch>
<targetType>OrgType</targetType>
<filter>
<q:equal>
<q:path>name</q:path>
<expression>
<script>
<code>
grouper_group
</code>
</script>
</expression>
</q:equal>
</filter>
<assignmentProperties>
<subtype>group</subtype>
</assignmentProperties>
<createOnDemand>true</createOnDemand>
<populateObject>
<populateItem>
<target>
<path>name</path>
</target>
<expression>
<script>
<code>
grouper_group
</code>
</script>
</expression>
</populateItem>
<populateItem>
<target>
<path>subtype</path>
</target>
<expression>
<value>group</value>
</expression>
</populateItem>
</populateObject>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
<set>
<condition>
<script>
<code>
assignment?.subtype.contains('group')
</code>
</script>
</condition>
</set>
</target>
</mapping>
</objectTemplate>
6 changes: 6 additions & 0 deletions demo/complex/midpoint-objects/orgs/org-groups.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<org xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
oid="1f339075-5b2f-4a18-9c98-451f3eb0d28d">
<name>groups</name>
<displayName>Groups</displayName>
</org>
10 changes: 10 additions & 0 deletions demo/complex/midpoint-objects/resources/resource-grouper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,20 @@
<attribute>
<ref>icfs:name</ref>
<inbound>
<strength>strong</strength>
<target>
<path>name</path>
</target>
</inbound>
<inbound>
<strength>strong</strength>
<expression>
<value>group</value>
</expression>
<target>
<path>subtype</path>
</target>
</inbound>
</attribute>
</objectType>
</schemaHandling>
Expand Down
16 changes: 16 additions & 0 deletions demo/complex/midpoint-objects/roles/metarole-group.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<role 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:xsi="http://www.w3.org/2001/XMLSchema-instance"
oid="48e231be-8474-4ed0-a85e-6acf4c5e8d52">
<name>metarole-group</name>
<inducement id="1">
<targetRef oid="1f339075-5b2f-4a18-9c98-451f3eb0d28d" relation="org:default" type="c:OrgType" /> <!-- groups -->
</inducement>

</role>
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,20 @@
<subtype>course</subtype>
<objectTemplateRef xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" oid="d35bdec6-643b-41d8-ad5d-8eeb701169d1" relation="org:default" type="tns:ObjectTemplateType"/>
</defaultObjectPolicyConfiguration>
<defaultObjectPolicyConfiguration id="100">
<type>OrgType</type>
<subtype>group</subtype>
<objectTemplateRef xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" oid="e2a6193a-8981-4143-9da1-9a7b32c0b819" relation="org:default" type="tns:ObjectTemplateType"/>
</defaultObjectPolicyConfiguration>
<defaultObjectPolicyConfiguration id="21">
<type>RoleType</type>
<subtype>generic-group</subtype>
<objectTemplateRef xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" oid="804f8658-0828-4dab-a2ed-f13985e4f80b" relation="org:default" type="tns:ObjectTemplateType"/>
</defaultObjectPolicyConfiguration>
<defaultObjectPolicyConfiguration id="101">
<type>UserType</type>
<objectTemplateRef xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" oid="8098b124-c20c-4965-8adf-e528abedf7a4" relation="org:default" type="tns:ObjectTemplateType"/>
</defaultObjectPolicyConfiguration>
<cleanupPolicy>
<auditRecords>
<maxAge>P3M</maxAge>
Expand Down

0 comments on commit 7f20946

Please sign in to comment.