Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mapping playground: new sample for deriving DN from parent org names
- Loading branch information
Showing
11 changed files
with
123 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...s/com/evolveum/midpoint/web/page/admin/configuration/mapping-samples/OrgName.map.xml.data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- This mapping derives a value from parent organization's name. | ||
It is used here to demonstrate derivation of LDAP distinguished name | ||
based on the name of parent organization (and its parent and its parent) --> | ||
<mapping> | ||
<source> | ||
<path>parentOrgRef</path> | ||
</source> | ||
<source> | ||
<path>name</path> | ||
</source> | ||
<expression> | ||
<script> | ||
<code> | ||
org1 = parentOrgRef != null ? midpoint.getOrgByOid(parentOrgRef?.oid) : null | ||
org2 = org1?.parentOrgRef ? midpoint.getOrgByOid(org1?.parentOrgRef.get(0).oid) : null | ||
org3 = org2?.parentOrgRef ? midpoint.getOrgByOid(org2?.parentOrgRef.get(0).oid) : null | ||
|
||
'uid=' + name + | ||
(org1 ? ',ou=' + org1?.name : '') + | ||
(org2 ? ',ou=' + org2?.name : '') + | ||
(org3 ? ',ou=' + org3?.name : '') + ',dc=example,dc=com' | ||
</code> | ||
</script> | ||
</expression> | ||
<target> | ||
<path>description</path> | ||
</target> | ||
</mapping> |
20 changes: 20 additions & 0 deletions
20
...s/com/evolveum/midpoint/web/page/admin/configuration/mapping-samples/OrgName.req.xml.data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Please replace OIDs in targetRef by real OIDs of org being unassigned and assigned --> | ||
<mappingExecutionRequest> | ||
<sourceContext> | ||
<objectRef oid="00000000-0000-0000-0000-000000000002" type="UserType"/> | ||
<delta> | ||
<changeType>modify</changeType> | ||
<objectType>UserType</objectType> | ||
<itemDelta> | ||
<modificationType>add</modificationType> | ||
<path>parentOrgRef</path> | ||
<value oid="73dd4b6f-088a-4bfb-b12d-5a9ce058c8a5" type="OrgType"/> | ||
</itemDelta> | ||
<itemDelta> | ||
<modificationType>add</modificationType> | ||
<path>parentOrgRef</path> | ||
<value oid="d1bb0eaf-3cc0-4cfd-99ec-6c000c7349ba" type="OrgType"/> | ||
</itemDelta> | ||
</delta> | ||
</sourceContext> | ||
</mappingExecutionRequest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.