浏览代码

fix: disable "enable new sign ups" not working issue

Timothy J. Baek 7 月之前
父节点
当前提交
d0df2cbe53
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/open_webui/apps/webui/routers/auths.py

+ 2 - 2
backend/open_webui/apps/webui/routers/auths.py

@@ -190,8 +190,8 @@ async def signin(request: Request, response: Response, form_data: SigninForm):
 async def signup(request: Request, response: Response, form_data: SignupForm):
 async def signup(request: Request, response: Response, form_data: SignupForm):
     if (
     if (
         not request.app.state.config.ENABLE_SIGNUP
         not request.app.state.config.ENABLE_SIGNUP
-        and request.app.state.config.ENABLE_LOGIN_FORM
-        and WEBUI_AUTH
+        or not request.app.state.config.ENABLE_LOGIN_FORM
+        or not WEBUI_AUTH
     ):
     ):
         raise HTTPException(
         raise HTTPException(
             status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.ACCESS_PROHIBITED
             status.HTTP_403_FORBIDDEN, detail=ERROR_MESSAGES.ACCESS_PROHIBITED