in src/main/java/com/googlesource/gerrit/plugins/saml/SamlMembership.java [152:170]
private InternalGroup createGroup(AccountGroup.NameKey name, String samlGroup) {
try {
AccountGroup.Id groupId = AccountGroup.id(sequences.nextGroupId());
AccountGroup.UUID uuid = GroupUuid.make(name.get(), serverIdent);
InternalGroupCreation groupCreation =
InternalGroupCreation.builder()
.setGroupUUID(uuid)
.setNameKey(name)
.setId(groupId)
.build();
GroupDelta.Builder groupUpdateBuilder =
GroupDelta.builder()
.setVisibleToAll(false)
.setDescription(samlGroup + " (imported by the SAML plugin)");
return groupsUpdateProvider.get().createGroup(groupCreation, groupUpdateBuilder.build());
} catch (Exception e) {
throw new RuntimeException(e);
}
}