Add option to allow groups to be determined by registering email address #677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
To implement changes for a specific requirement, we have implemented the following features as part of the registration module:
Additionally, we changed the response text for non-permitted domains, and if the user already exists, to a generic response instead of a detailed error, to reduce the opportunity for unauthenticated account enumeration (even though this is heavily restricted by the rate limiter) as this was a security requirement.
I'm not sure to what degree you are interested in these features upstream, so if you would like these options please let me know any changes required to make this eligible for merging.
The changes allow for a workflow where subdomains of a corporate domain can self-register and have the relevant department lead authorise their account creation. For example:
email@hr.corp.com -> HR Group -> Emails HR group admins for approval
email@it.corp.com -> IT Group -> Emails IT group admins for approval
email@corp.com -> Default group -> Emails default group admins for approval
Note: I'm not entirely familiar with how the l18n implementation with vue is working here, so I added some translation strings directly for english. I'm not sure if this is the correct approach.
Additionally, currently the mapping is stored in a new database table. I have not pushed a migration as part of this PR as I would like to verify this method is acceptable. If you have an alternative way of storing the mappings you would prefer, please let me know.
The simple migration I have used for my custom version of this module is as follows: