refactor: rename mail_allowlisted to signup_allowed?

Follow Elixir naming conventions by using question mark suffix for boolean
functions. Renamed mail_allowlisted to signup_allowed? and mail_allowlisted_fun
to signup_allowed_fun throughout the codebase.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Your Name
2025-09-16 09:44:11 +00:00
co-authored by Claude
parent a89ed0c80c
commit 8112173ef4
4 changed files with 12 additions and 12 deletions
+4 -4
View File
@@ -26,15 +26,15 @@ defmodule BasicSignupAllowlist do
## Examples
iex> System.delete_env("SIGNUP_ALLOWLIST_EMAILS")
iex> BasicSignupAllowlist.mail_allowlisted("joe@example.com")
iex> BasicSignupAllowlist.signup_allowed?("joe@example.com")
false
iex> System.put_env("SIGNUP_ALLOWLIST_EMAILS","*")
iex> BasicSignupAllowlist.mail_allowlisted("joe@example.com")
iex> BasicSignupAllowlist.signup_allowed?("joe@example.com")
true
"""
def mail_allowlisted(email) do
def signup_allowed?(email) do
env_value = System.get_env(@signup_allowlist_emails)
mail_allowlisted_fun(env_value, email)
signup_allowed_fun(env_value, email)
end
end
+1 -1
View File
@@ -9,7 +9,7 @@ defmodule FunCore.BasicSignupAllowlist do
|> Enum.map(&normalize/1)
end
def mail_allowlisted_fun(signups_allowed, email_received) do
def signup_allowed_fun(signups_allowed, email_received) do
case signups_allowed do
nil -> false
"*" -> true