Automatic registration domain wild card

AI-generated summary

The discussion is about the inconsistency between the email domains whitelist setting and the automatic registration email domains setting in Discourse. Rhidian pointed out that adding a top-level domain (e.g., nhs.uk) to the whitelist allows users with subdomains (e.g., organisation.nhs.uk) to register, but the same does not work for automatic group registration. Rhidian suggested using a wildcard character, but it does not work.

Codinghorror questioned the expectation of retrospective addition to groups, suggesting it could be surprising or even dangerous. However, Rhidian mentioned that Discourse 2.4 does provide a prompt to include members already registered with the domain, making it a useful feature.

SAM confirmed the inconsistency and suggested making the automatic group membership coherent and consistent with the email_domains_whitelist matcher. SAM requested @techAPJ to adjust the group regex to allow subdomains.

I’ve noticed a difference in behaviour between the email domains whitelist setting at registration - and the automatic registration email domains setting in manage groups.

I work in the NHS where users have email addresses with sub domains emails @organisation.nhs.uk

The whitelist lets them all register by adding top domain nhs.uk to the list. That works well for me.

If I add the same top domain nhs.uk to automatically add them to a group - it doesn’t add them - at least not retrospectively.

I would like the automatic group registration to behave as the whitelist does. I’ve tried a wildcard character asterisk but that doesn’t work.

Do you have any suggestions - other than going through and adding every sub domain?

Why would retrospective addition be expected here? Couldn’t that be surprising and possibly even dangerous in other contexts?

(Thinking about this more, perhaps a dynamic pop-up prompt “do you want to make this retrospective, it will affect {x} users?” would work better?)

Yeah there is an inconsistency internally, our automatic group membership is based off a strict domain match per:

Our matcher for the email_domains_whitelist uses this match

I think it makes sense to make this coherent and consistent.

@techAPJ can you adjust the group regex.. carefully and make sure it is tested so it also allows subdomains.

Discourse 2.4 does give this prompt to include member already registered with the domain. It’s a great feature and works well, aside from this inconsistency.

Thank you :folded_hands: