MM-64610: Restrict import upload for shared channels feature. (#31659)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
26613fb4c6
Коммит
c5f79bba09
@@ -218,6 +218,13 @@ func uploadRemoteData(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Apply same security restrictions as normal upload API
|
||||||
|
if us.Type == model.UploadTypeImport {
|
||||||
|
c.Err = model.NewAppError("uploadRemoteData", "api.remote_cluster.import_not_allowed.app_error",
|
||||||
|
nil, "", http.StatusBadRequest)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
info, err := doUploadData(c, us, r)
|
info, err := doUploadData(c, us, r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Err = err
|
c.Err = err
|
||||||
|
|||||||
@@ -2878,6 +2878,10 @@
|
|||||||
"id": "api.remote_cluster.get.not_found",
|
"id": "api.remote_cluster.get.not_found",
|
||||||
"translation": "Remote Cluster not found"
|
"translation": "Remote Cluster not found"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "api.remote_cluster.import_not_allowed.app_error",
|
||||||
|
"translation": "Remote cluster import is not allowed"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "api.remote_cluster.invalid_id.app_error",
|
"id": "api.remote_cluster.invalid_id.app_error",
|
||||||
"translation": "Invalid id."
|
"translation": "Invalid id."
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user