Unverified Commit 8d08cfe1 authored by Mr. Lin's avatar Mr. Lin Committed by GitHub

fix: incorrectly checking whether registration is allowed in the login v1 api (#2998)

fix: Incorrectly checking whether registration is allowed in the login interface, resulting in the inability to log in through apiv1
parent b0f52ade
...@@ -64,9 +64,6 @@ func (s *APIV1Service) SignIn(c echo.Context) error { ...@@ -64,9 +64,6 @@ func (s *APIV1Service) SignIn(c echo.Context) error {
if err != nil { if err != nil {
return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find system setting").SetInternal(err) return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find system setting").SetInternal(err)
} }
if workspaceGeneralSetting.DisallowSignup {
return echo.NewHTTPError(http.StatusUnauthorized, "signup is disabled").SetInternal(err)
}
if workspaceGeneralSetting.DisallowPasswordLogin { if workspaceGeneralSetting.DisallowPasswordLogin {
return echo.NewHTTPError(http.StatusUnauthorized, "password login is deactivated").SetInternal(err) return echo.NewHTTPError(http.StatusUnauthorized, "password login is deactivated").SetInternal(err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment