PLT-6554 Add config setting to control enabling API version 3 (#6835)
* Add config setting to control enabling API version 3 * Update help text for APIv3 config setting (#6843) * Update configuration_settings.jsx * Update en.json
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4bd7b68b24
Коммит
8ec8948c84
@@ -205,6 +205,10 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
c.Path = "/" + strings.Join(splitURL[2:], "/")
|
||||
}
|
||||
|
||||
if h.isApi && !*utils.Cfg.ServiceSettings.EnableAPIv3 {
|
||||
c.Err = model.NewAppError("ServeHTTP", "api.context.v3_disabled.app_error", nil, "", http.StatusNotImplemented)
|
||||
}
|
||||
|
||||
if c.Err == nil && h.requireUser {
|
||||
c.UserRequired()
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user