Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
The "supergroup" is now obsolete and was removed. It temporarily stays
as a parameter for Grouper connector but we can specify any existing
group there, as it is used solely for the "test resource" operation.
1 contributor

Users who have contributed to this file

21 lines (18 sloc) 663 Bytes
def addGroups(gs,stem,owner,regexp) {
for (group in stem.childGroups) {
if (!group.name.endsWith('_includes') &&
!group.name.endsWith('_excludes') &&
!group.name.endsWith('_systemOfRecord') &&
!group.name.endsWith('_systemOfRecordAndIncludes') &&
(regexp == null || group.extension ==~ regexp)) {
println 'Adding: ' + group
def s = SubjectFinder.findById(group.getId(), 'group', 'g:gsa')
owner.addMember(s, false)
} else {
println 'Ignoring: ' + group
}
}
}
gs = GrouperSession.startRootSession()
def cs = GroupFinder.findByName(gs, "app:cs", true)
addGroups(gs, StemFinder.findByName(gs, 'ref:course'), cs, /CS.*/)