email block checking for signups

This commit is contained in:
tsmethurst 2021-03-25 23:49:29 +01:00
commit 0a244be523
3 changed files with 30 additions and 12 deletions

View file

@ -138,8 +138,11 @@ type DB interface {
// Returns an error if the username is already taken, or something went wrong in the db.
IsUsernameAvailable(username string) error
// IsEmailAvailable checks whether a given email address for a user is available on our domain.
// Returns an error if the email is already associated with an account, or something went wrong in the db.
// IsEmailAvailable checks whether a given email address for a new account is available to be used on our domain.
// Return an error if:
// A) the email is already associated with an account
// B) we block signups from this email domain
// C) something went wrong in the db
IsEmailAvailable(email string) error
/*