fix bug with public registration

This commit is contained in:
2023-02-04 09:57:10 -05:00
parent f990fafc6a
commit 1726a1b72e
8 changed files with 26 additions and 22 deletions

View File

@ -384,7 +384,7 @@ defmodule Memex.Accounts do
"""
@spec allow_registration?() :: boolean()
def allow_registration? do
Application.get_env(:Memex, MemexWeb.Endpoint)[:registration] == "public" or
Application.get_env(:memex, Memex.Accounts)[:registration] == "public" or
list_users_by_role(:admin) |> Enum.empty?()
end

View File

@ -109,8 +109,7 @@
<li class="flex flex-row justify-center space-x-2">
<b><%= gettext("registration:") %></b>
<p>
<%= Application.get_env(:memex, Endpoint)[:registration]
|> case do
<%= case Application.get_env(:memex, Memex.Accounts)[:registration] do
"public" -> gettext("public signups")
_ -> gettext("invite only")
end %>