🔥 Remove USERS_OPEN_REGISTRATION config, make registration enabled by default (#1274)

This commit is contained in:
Alejandra
2024-07-31 17:08:26 -05:00
committed by GitHub
parent 7bba5a85f0
commit 1f686689f1
7 changed files with 31 additions and 71 deletions

View File

@@ -146,11 +146,6 @@ def register_user(session: SessionDep, user_in: UserRegister) -> Any:
"""
Create new user without the need to be logged in.
"""
if not settings.USERS_OPEN_REGISTRATION:
raise HTTPException(
status_code=403,
detail="Open user registration is forbidden on this server",
)
user = crud.get_user_by_email(session=session, email=user_in.email)
if user:
raise HTTPException(