forked from docker/midPoint_container
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
|
|
||
| def addGroups(gs,stem) { | ||
| def supergroup = GroupFinder.findByName(gs, "etc:midpointGroups", true) | ||
| for (group in stem.childGroups) { | ||
| if (!group.name.endsWith('_includes') && | ||
| !group.name.endsWith('_excludes') && | ||
| !group.name.endsWith('_systemOfRecord') && | ||
| !group.name.endsWith('_systemOfRecordAndIncludes')) { | ||
| println 'Adding: ' + group | ||
| def s = SubjectFinder.findById(group.getId(), 'group', 'g:gsa') | ||
| supergroup.addMember(s, false) | ||
| } else { | ||
| println 'Ignoring: ' + group | ||
| } | ||
| } | ||
| } | ||
|
|
||
| gs = GrouperSession.startRootSession() | ||
|
|
||
| addGroups(gs, StemFinder.findByName(gs, 'ref:affiliation')) | ||
| addGroups(gs, StemFinder.findByName(gs, 'ref:dept')) | ||
| addGroups(gs, StemFinder.findByName(gs, 'ref:course')) | ||
|
|
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,2 @@ | ||
| docker cp add-ref-groups.gsh complex_grouper_daemon_1:/tmp/ | ||
| docker exec complex_grouper_daemon_1 bash -c "/opt/grouper/grouper.apiBinary/bin/gsh /tmp/add-ref-groups.gsh" |