Invalidate cloud caches when a new license is loaded (#21579)

Automatic Merge
Этот коммит содержится в:
Nick Misasi
2022-11-02 16:40:26 -04:00
коммит произвёл GitHub
родитель 1ae97fc381
Коммит a541cda9d0
19 изменённых файлов: 69 добавлений и 43 удалений

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

@@ -48,7 +48,7 @@ func createUpload(c *Context, w http.ResponseWriter, r *http.Request) {
c.SetPermissionError(model.PermissionManageSystem)
return
}
if c.App.Srv().License() != nil && *c.App.Srv().License().Features.Cloud {
if c.App.Srv().License().IsCloud() {
c.Err = model.NewAppError("createUpload", "api.file.cloud_upload.app_error", nil, "", http.StatusBadRequest)
return
}
@@ -127,7 +127,7 @@ func uploadData(c *Context, w http.ResponseWriter, r *http.Request) {
c.SetPermissionError(model.PermissionManageSystem)
return
}
if c.App.Srv().License() != nil && *c.App.Srv().License().Features.Cloud {
if c.App.Srv().License().IsCloud() {
c.Err = model.NewAppError("UploadData", "api.file.cloud_upload.app_error", nil, "", http.StatusBadRequest)
return
}