根据他们的电子邮箱域名将用户添加到组中

:bookmark: This guide explains how to automatically add users to a Discourse group based on their email domain. It is intended for site administrators who manage Discourse groups.

:person_raising_hand: Required user level: Administrator

Discourse allows you to automatically add users to a custom group based on the email domain that they register with.

To add users to a group based on their email domain:

  1. Navigate to the group’s “Manage” → “Membership” page.

  2. In the “Automatic” section, add the desired email domain(s).

  3. Save to apply the changes. Existing users who match the email domain will also be automatically added to the group upon saving.

:information_source: This setting is only available for custom groups that you create, but it can be used to automatically grant membership in a Discourse Trust Level group by combining it with the group’s automatic Trust Level setting:

Last edited by @SaraDev 2024-07-09T20:41:17Z

Check documentPerform check on document:
7 个赞

Hi Simon i don’t seeme to be able to see this setting when setting up the automatic rules. Any idea why?

Thanks for pointing that out. It looks like that setting has been removed. Existing users are now automatically added to the group. This is probably the desired behaviour for most cases. One thing I noticed is that when saving the changes after a domain has been added to the setting, a modal window lets you know about the changes, but there is no obvious way to back out of the change:

I’ll update this topic’s first post to describe the new behaviour. The copy that we use for the “Automatic” setting also needs to be updated to make it clear that it affects all users on the site.

1 个赞

一种变体:用户有一个组织邮箱地址,这意味着他们被添加到该组织的群组中。但之后他们离开了该组织并失去了对该邮箱地址的访问权限,他们仍然可以访问该群组。
如果他们删除了邮箱地址,难道不应该也将他们从群组中移除吗?

1 个赞