String bgTyp = businessGroup.getType();
if (BusinessGroup.TYPE_BUDDYGROUP.equals(bgTyp)) {
BGConfigFlags flags = BGConfigFlags.createBuddyGroupDefaultFlags();
flags.setEnabled(BGConfigFlags.IS_GM_ADMIN, false);
return new BusinessGroupMainRunController(ureq, bwControl, businessGroup, flags, initialViewIdentifier);
} else if (BusinessGroup.TYPE_LEARNINGROUP.equals(bgTyp)) {
BGConfigFlags flags = BGConfigFlags.createLearningGroupDefaultFlags();
flags.setEnabled(BGConfigFlags.IS_GM_ADMIN, isGMAdmin);
return new BusinessGroupMainRunController(ureq, bwControl, businessGroup, flags, initialViewIdentifier);
} else if (BusinessGroup.TYPE_RIGHTGROUP.equals(bgTyp)) {
BGConfigFlags flags = BGConfigFlags.createRightGroupDefaultFlags();
flags.setEnabled(BGConfigFlags.IS_GM_ADMIN, isGMAdmin);
return new BusinessGroupMainRunController(ureq, bwControl, businessGroup, flags, initialViewIdentifier);
}
// else
throw new AssertException("unknown BusinessGroupType::" + bgTyp);
}