when not defined, not allowed
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
defmodule BasicSignupWhitelist do
|
||||
@moduledoc """
|
||||
Documentation for `BasicSignupWhitelist`.
|
||||
Checks if an email address is allowed based on the SIGNUP_ALLOWED_EMAILS env variable.
|
||||
"""
|
||||
|
||||
@doc """
|
||||
false
|
||||
Checks if an email address is allowed based on the SIGNUP_ALLOWED_EMAILS env variable.
|
||||
|
||||
Rules:
|
||||
- Returns true if ALLOWED_EMAILS == "*" (all emails allowed)
|
||||
- Returns true if email matches any entry in the comma-separated list
|
||||
- Returns false if:
|
||||
* Environment variable doesn't exist
|
||||
* Environment variable is empty string
|
||||
* Email not found in whitelist
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
Reference in New Issue
Block a user