Closed petecoop closed 3 months ago
Thank you for your contribution, this is a nice feature to have! I've combined it with the existing isUserAllowed
function and added some new tests.
Wow nice you've really tidied up the feature I added :)
The only downside I see is that no matter what check you put in you will get the error message of "Your email is not part of a domain that is allowed." although that isn't the reason - it's down to the custom closure. This is one reason I separated it out into it's own method but I was wondering if there could be a way to pass a validation message that could be displayed on failure.
@petecoop You should be able to publish the translation files and change it. The only reason I reversed the translation was because it would introduce a breaking change.
We will address this when we do a new major release.
@bramr94 Yeah sorry what I meant is that there is no way to provide a different message depending on if not in the domain list or have failed the custom check - either one will provide the same message
This is something I needed for an integration I'm working on, where only users with an admin user level should be able to login to the system but this could be customised to reject a user for any reason.
Usage: