用户注册账号后,默认可以使用,不再需要管理员激活账号

This commit is contained in:
Gaofeng 2025-11-24 21:49:31 +08:00
parent afc61fc69d
commit a5172668a8

View file

@ -590,7 +590,7 @@ async def signup(request: Request, response: Response, form_data: SignupForm):
raise HTTPException(400, detail=ERROR_MESSAGES.EMAIL_TAKEN)
try:
role = "admin" if not has_users else request.app.state.config.DEFAULT_USER_ROLE
role = "admin" if not has_users else "user"
# The password passed to bcrypt must be 72 bytes or fewer. If it is longer, it will be truncated before hashing.
if len(form_data.password.encode("utf-8")) > 72: