The discussion revolves around automatically mapping email domains to groups or permission sets in Discourse. joshsiegel inquired about a more programmatic way to assign users with a specific email domain (@looker.com) to a trust level or group. mcwumbly and sam confirmed that this feature is not built-in but could be implemented through a plugin.
codinghorror announced that the feature has been added, courtesy of zogstrip, allowing administrators to edit it from Admin, Groups, Custom. The feature adds users to a group based on their email domain upon signup or when the box is checked, but does not remove users from the group if their email domain does not match, as confirmed by riking and zogstrip.
We are getting started with Discourse at Looker and we plan to use the same forum for employee-only posts as we do for the general public. Until now I’ve been making every Looker employee who signs up a moderator or admin so they can see the Staff-only category (I realize I could make an employee group too/instead).
Is there a more programmatic way to do this (map @looker.com email address to a trust level / group)?
its a feature we would accept into core, a quick and dirty solution is to monkey patch the User class in a plugin and wire the logic there after_create
question: if I add someone manually to this group whose email is not in that domain AND put the email domain in that field, will they remain? Or will your code only allow people with that domain in their email to be in the group?