Mm 49496 Add state and jobs for preventing screened purchase attempts from retrying (#22188)

* make signup unavailable when screening is in progress
Этот коммит содержится в:
Nathaniel Allred
2023-02-02 15:48:59 -06:00
коммит произвёл GitHub
родитель a68515b69a
Коммит f713862041
7 изменённых файлов: 90 добавлений и 0 удалений

Просмотреть файл

@@ -230,6 +230,11 @@ func handleSignupAvailable(c *Context, w http.ResponseWriter, r *http.Request) {
}
return
}
systemValue, err := c.App.Srv().Store().System().GetByName(model.SystemHostedPurchaseNeedsScreening)
if err == nil && systemValue != nil {
c.Err = model.NewAppError(where, "api.server.hosted_signup_unavailable.error", nil, "", http.StatusTooEarly)
return
}
ReturnStatusOK(w)
}