Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Loading status checks…
Adapt demo/complex to Grouper MQ integration
Showing
17 changed files
with
311 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
B='\033[1;33m' | ||
N='\033[0m' | ||
|
||
echo -e "${B} * Uploading objects...${N}" | ||
$(dirname "$0")/upload-objects.sh | ||
|
||
echo -e "${B} * Testing LDAP and SQL resources...${N}" | ||
$(dirname "$0")/test-resources-1.sh | ||
|
||
echo -e "${B} * Recomputing Grouper admin group and user object...${N}" | ||
$(dirname "$0")/recompute.sh | ||
|
||
echo -e "${B} * Testing Grouper resource...${N}" | ||
$(dirname "$0")/test-resource-grouper.sh | ||
|
||
echo -e "${B} * Done${N}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<user 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" | ||
oid="e897468f-20bd-419c-8fc5-1fe60e2600de"> | ||
<name>banderson</name> | ||
<assignment id="1"> | ||
<targetRef oid="d48ec05b-fffd-4262-acd3-d9ff63365b62" relation="org:default" type="c:RoleType"> | ||
<!-- role-grouper-sysadmin --> | ||
</targetRef> | ||
</assignment> | ||
<fullName>Bob Anderson</fullName> | ||
<givenName>Bob</givenName> | ||
<familyName>Anderson</familyName> | ||
<credentials> | ||
<password> | ||
<value>password</value> | ||
</password> | ||
</credentials> | ||
</user> | ||
|
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,6 @@ | ||
#!/bin/bash | ||
|
||
source $(dirname "$0")/../../library.bash | ||
|
||
recompute roles d48ec05b-fffd-4262-acd3-d9ff63365b62 | ||
recompute users e897468f-20bd-419c-8fc5-1fe60e2600de |
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,5 @@ | ||
#!/bin/bash | ||
|
||
source $(dirname "$0")/../../library.bash | ||
|
||
test_resource 1eff65de-5bb6-483d-9edf-8cc2c2ee0233 |
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
22 changes: 22 additions & 0 deletions
22
demo/complex/tests/resources/bulk-action/assign-role-grouper-sysadmin-to-banderson.xml
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,22 @@ | ||
<scext:executeScript xmlns:scext="http://midpoint.evolveum.com/xml/ns/public/model/scripting/extension-3"> | ||
<s:search xmlns:s="http://midpoint.evolveum.com/xml/ns/public/model/scripting-3" | ||
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<s:type>c:UserType</s:type> | ||
<s:searchFilter> | ||
<q:equal> | ||
<q:path>c:name</q:path> | ||
<q:value>banderson</q:value> | ||
</q:equal> | ||
</s:searchFilter> | ||
<s:action> | ||
<s:type>assign</s:type> | ||
<s:parameter> | ||
<s:name>role</s:name> | ||
<c:value xsi:type="xsd:string">d48ec05b-fffd-4262-acd3-d9ff63365b62</c:value> | ||
</s:parameter> | ||
</s:action> | ||
</s:search> | ||
</scext:executeScript> |
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,31 @@ | ||
System.out.println("************** t260.gsh starting **************"); | ||
|
||
gs = GrouperSession.startRootSession() | ||
|
||
midpointGroups = GroupFinder.findByName(gs, 'etc:midpointGroups') | ||
|
||
new GroupSave(gs).assignName("midpoint:alum").assignCreateParentStemsIfNotExist(true).save() | ||
GroupFinder.findByName(gs, 'midpoint:alum').addMember(SubjectFinder.findByIdentifier('ref:affiliation:alum', 'group', 'g:gsa'), false) | ||
midpointGroups.addMember(SubjectFinder.findByIdentifier('midpoint:alum', 'group', 'g:gsa'), false) | ||
|
||
new GroupSave(gs).assignName("midpoint:community").assignCreateParentStemsIfNotExist(true).save() | ||
GroupFinder.findByName(gs, 'midpoint:community').addMember(SubjectFinder.findByIdentifier('ref:affiliation:community', 'group', 'g:gsa'), false) | ||
midpointGroups.addMember(SubjectFinder.findByIdentifier('midpoint:community', 'group', 'g:gsa'), false) | ||
|
||
new GroupSave(gs).assignName("midpoint:faculty").assignCreateParentStemsIfNotExist(true).save() | ||
GroupFinder.findByName(gs, 'midpoint:faculty').addMember(SubjectFinder.findByIdentifier('ref:affiliation:faculty', 'group', 'g:gsa'), false) | ||
midpointGroups.addMember(SubjectFinder.findByIdentifier('midpoint:faculty', 'group', 'g:gsa'), false) | ||
|
||
new GroupSave(gs).assignName("midpoint:member").assignCreateParentStemsIfNotExist(true).save() | ||
GroupFinder.findByName(gs, 'midpoint:member').addMember(SubjectFinder.findByIdentifier('ref:affiliation:member', 'group', 'g:gsa'), false) | ||
midpointGroups.addMember(SubjectFinder.findByIdentifier('midpoint:member', 'group', 'g:gsa'), false) | ||
|
||
new GroupSave(gs).assignName("midpoint:staff").assignCreateParentStemsIfNotExist(true).save() | ||
GroupFinder.findByName(gs, 'midpoint:staff').addMember(SubjectFinder.findByIdentifier('ref:affiliation:staff', 'group', 'g:gsa'), false) | ||
midpointGroups.addMember(SubjectFinder.findByIdentifier('midpoint:staff', 'group', 'g:gsa'), false) | ||
|
||
new GroupSave(gs).assignName("midpoint:student").assignCreateParentStemsIfNotExist(true).save() | ||
GroupFinder.findByName(gs, 'midpoint:student').addMember(SubjectFinder.findByIdentifier('ref:affiliation:student', 'group', 'g:gsa'), false) | ||
midpointGroups.addMember(SubjectFinder.findByIdentifier('midpoint:student', 'group', 'g:gsa'), false) | ||
|
||
System.out.println("************** t260.gsh done **************"); |
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,11 @@ | ||
System.out.println("************** t330.gsh starting **************"); | ||
|
||
gs = GrouperSession.startRootSession() | ||
|
||
testGroup = GroupFinder.findByName(gs, 'midpoint:test') | ||
alumIncludesGroup = GroupFinder.findByName(gs, 'ref:affiliation:alum_includes') | ||
wprice = SubjectFinder.findById('wprice', 'person', 'ldap') | ||
testGroup.addMember(wprice, false) | ||
alumIncludesGroup.addMember(wprice, false) | ||
|
||
System.out.println("************** t330.gsh done **************"); |
6 changes: 3 additions & 3 deletions
6
.../complex/tests/resources/grouper/t420.gsh → .../complex/tests/resources/grouper/t350.gsh
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
System.out.println("************** t420.gsh starting **************"); | ||
System.out.println("************** t350.gsh starting **************"); | ||
|
||
gs = GrouperSession.startRootSession() | ||
|
||
alumIncludes = GroupFinder.findByName(gs, 'ref:affiliation:alum_includes') | ||
testGroup = GroupFinder.findByName(gs, 'etc:testGroup') | ||
testGroup = GroupFinder.findByName(gs, 'midpoint:test') | ||
kwhite = SubjectFinder.findById('kwhite', 'person', 'ldap') | ||
wprice = SubjectFinder.findById('wprice', 'person', 'ldap') | ||
testGroup.addMember(kwhite, false) | ||
alumIncludes.deleteMember(wprice, false) | ||
|
||
System.out.println("************** t420.gsh done **************"); | ||
System.out.println("************** t350.gsh done **************"); |
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,11 @@ | ||
System.out.println("************** t410.gsh starting **************"); | ||
|
||
gs = GrouperSession.startRootSession() | ||
|
||
testGroup = GroupFinder.findByName(gs, 'midpoint:test') | ||
kwhite = SubjectFinder.findById('kwhite', 'person', 'ldap') | ||
wprice = SubjectFinder.findById('wprice', 'person', 'ldap') | ||
testGroup.deleteMember(kwhite, false) | ||
testGroup.deleteMember(wprice, false) | ||
|
||
System.out.println("************** t410.gsh done **************"); |
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 @@ | ||
<user 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" | ||
oid="a0c7c01e-c203-4777-9b21-27a4735da3ae"> | ||
<name>grouper-admin</name> | ||
<assignment id="1"> | ||
<targetRef oid="d48ec05b-fffd-4262-acd3-d9ff63365b62" relation="org:default" type="c:RoleType"> | ||
<!-- role-grouper-sysadmin --> | ||
</targetRef> | ||
</assignment> | ||
<fullName>Grouper admin</fullName> | ||
<givenName>Grouper</givenName> | ||
<familyName>Admin</familyName> | ||
<credentials> | ||
<password> | ||
<value>password</value> | ||
</password> | ||
</credentials> | ||
</user> | ||
|
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