feat: allow disabling registration
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
eb18209669
commit
09e4b64663
14 changed files with 344 additions and 5 deletions
|
|
@ -35,6 +35,19 @@ defmodule MvWeb.AuthOverrides do
|
|||
end
|
||||
end
|
||||
|
||||
defmodule MvWeb.AuthOverridesRegistrationDisabled do
|
||||
@moduledoc """
|
||||
When direct registration is disabled in global settings, this override is
|
||||
prepended in SignInLive so the Password component hides the "Need an account?"
|
||||
toggle (register_toggle_text: nil disables the register link per library docs).
|
||||
"""
|
||||
use AshAuthentication.Phoenix.Overrides
|
||||
|
||||
override AshAuthentication.Phoenix.Components.Password do
|
||||
set :register_toggle_text, nil
|
||||
end
|
||||
end
|
||||
|
||||
defmodule MvWeb.AuthOverridesDE do
|
||||
@moduledoc """
|
||||
German locale-specific overrides for AshAuthentication Phoenix components.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue