Here’s an outline for the specific code Adam mentioned previously:
- (L36) get all users in the external system
- (L37) get all users in Discourse
- (L38-39) get all members of the groups in question (
globalis the “supergroup” in this case) - (L46-78) for each user in the external system, check if they exist in Discourse, and map which groups they’re already part of and need to be added to