Allow disabling registration, add Interactive module with tools
This commit is contained in:
@@ -60,6 +60,7 @@ defmodule SsoBsn.Accounts do
|
||||
|
||||
"""
|
||||
def register_user(attrs) do
|
||||
if not Application.get_env(:sso_bsn, :enable_registration, false), do: raise "Cannot register a user: disabled"
|
||||
%User{}
|
||||
|> User.registration_changeset(attrs)
|
||||
|> Repo.insert()
|
||||
|
||||
Reference in New Issue
Block a user