From a3320e0ce31352e9279b87a9bed31b5bdfd8ad91 Mon Sep 17 00:00:00 2001 From: Derrick Anderson Date: Mon, 5 Mar 2018 14:50:10 -0500 Subject: Uncomment upgrade code to 4.8 (#8409) * upgrade to 48 * fix upgrade bug --- model/version.go | 1 + store/sqlstore/upgrade.go | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/model/version.go b/model/version.go index 6e461e5d5..3e75478d3 100644 --- a/model/version.go +++ b/model/version.go @@ -13,6 +13,7 @@ import ( // It should be maitained in chronological order with most current // release at the front of the list. var versions = []string{ + "4.8.0", "4.7.1", "4.7.0", "4.6.0", diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go index 77289183c..1e704ec01 100644 --- a/store/sqlstore/upgrade.go +++ b/store/sqlstore/upgrade.go @@ -365,8 +365,7 @@ func UpgradeDatabaseToVersion471(sqlStore SqlStore) { } func UpgradeDatabaseToVersion48(sqlStore SqlStore) { - //TODO: Uncomment the following condition when version 4.8.0 is released - //if shouldPerformUpgrade(sqlStore, VERSION_4_7_0, VERSION_4_8_0) { - // saveSchemaVersion(sqlStore, VERSION_4_8_0) - //} + if shouldPerformUpgrade(sqlStore, VERSION_4_7_1, VERSION_4_8_0) { + saveSchemaVersion(sqlStore, VERSION_4_8_0) + } } -- cgit v1.2.3-1-g7c22 From a434fe763790e8089e5ad0b0eccceddd937e10b4 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 6 Mar 2018 20:01:18 -0600 Subject: register additional gob types to support arrays and dicts in post props (#8412) --- plugin/rpcplugin/api.go | 2 ++ plugin/rpcplugin/api_test.go | 43 ++++++++++++++++++++++++++++++++++++++----- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/plugin/rpcplugin/api.go b/plugin/rpcplugin/api.go index 5b5b11a62..d87f65b55 100644 --- a/plugin/rpcplugin/api.go +++ b/plugin/rpcplugin/api.go @@ -610,4 +610,6 @@ func ConnectAPI(conn io.ReadWriteCloser, muxer *Muxer) *RemoteAPI { func init() { gob.Register([]*model.SlackAttachment{}) + gob.Register([]interface{}{}) + gob.Register(map[string]interface{}{}) } diff --git a/plugin/rpcplugin/api_test.go b/plugin/rpcplugin/api_test.go index 145ec9005..7fe7a0ff9 100644 --- a/plugin/rpcplugin/api_test.go +++ b/plugin/rpcplugin/api_test.go @@ -72,11 +72,6 @@ func TestAPI(t *testing.T) { testPost := &model.Post{ Message: "hello", - Props: map[string]interface{}{ - "attachments": []*model.SlackAttachment{ - &model.SlackAttachment{}, - }, - }, } testAPIRPC(&api, func(remote plugin.API) { @@ -244,3 +239,41 @@ func TestAPI(t *testing.T) { assert.Nil(t, err) }) } + +func TestAPI_GobRegistration(t *testing.T) { + keyValueStore := &plugintest.KeyValueStore{} + api := plugintest.API{Store: keyValueStore} + defer api.AssertExpectations(t) + + testAPIRPC(&api, func(remote plugin.API) { + api.On("CreatePost", mock.AnythingOfType("*model.Post")).Return(func(p *model.Post) (*model.Post, *model.AppError) { + p.Id = "thepostid" + return p, nil + }).Once() + _, err := remote.CreatePost(&model.Post{ + Message: "hello", + Props: map[string]interface{}{ + "attachments": []*model.SlackAttachment{ + &model.SlackAttachment{ + Actions: []*model.PostAction{ + &model.PostAction{ + Integration: &model.PostActionIntegration{ + Context: map[string]interface{}{ + "foo": "bar", + "foos": []interface{}{"bar", "baz", 1, 2}, + "foo_map": map[string]interface{}{ + "1": "bar", + "2": 2, + }, + }, + }, + }, + }, + Timestamp: 1, + }, + }, + }, + }) + require.Nil(t, err) + }) +} -- cgit v1.2.3-1-g7c22 From af758c8e5df3d80e0910c5549660ffd6b16e6af2 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Wed, 7 Mar 2018 18:42:40 +0000 Subject: translations PR 20180306 (#8414) --- i18n/de.json | 26 +++++++++++++++++++++++++- i18n/en.json | 24 ++++++++++++------------ i18n/es.json | 26 +++++++++++++++++++++++++- i18n/fr.json | 26 +++++++++++++++++++++++++- i18n/it.json | 26 +++++++++++++++++++++++++- i18n/ja.json | 28 ++++++++++++++++++++++++++-- i18n/ko.json | 26 +++++++++++++++++++++++++- i18n/nl.json | 26 +++++++++++++++++++++++++- i18n/pl.json | 26 +++++++++++++++++++++++++- i18n/pt-BR.json | 26 +++++++++++++++++++++++++- i18n/ru.json | 26 +++++++++++++++++++++++++- i18n/tr.json | 44 ++++++++++++++++++++++++++++++++++---------- i18n/zh-CN.json | 30 +++++++++++++++++++++++++++--- i18n/zh-TW.json | 26 +++++++++++++++++++++++++- 14 files changed, 349 insertions(+), 37 deletions(-) diff --git a/i18n/de.json b/i18n/de.json index b58cd73b1..35355919c 100644 --- a/i18n/de.json +++ b/i18n/de.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "Dateiupload nicht möglich. Header können nicht geparst werden." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Unable to upload files. Incorrect number of files specified." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "Datei über den maximalen Dimensionen konnte nicht hochgeladen werden: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " Eine oder mehrere Dateien in einer Direktnachricht hochgeladen" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " Eine oder mehrere Dateien hochgeladen in " + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " in " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Plugins wurden deaktiviert." + "translation": "Plugins have been disabled. Please check your logs for details." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Kann Benutzer nicht auf AD/LDAP-Server finden: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "User not found in the users file." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Username already used by another Mattermost user." + }, { "id": "ent.saml.attribute.app_error", "translation": "SAML Login war nicht erfolgreich da Verschlüsselung nicht aktiviert ist. Bitte kontaktieren Sie Ihren Systemadministrator." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Ungültiger Wert für Webserver-Verbindungssicherheit." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "Die WebRTC-Gateway-Websocket-URL muss gesetzt und eine gültige URL sein sowie mit ws:// oder wss:// beginnen." + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Ungültiger Wert für write timeout." diff --git a/i18n/en.json b/i18n/en.json index 37639ba60..8457d6d3d 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1814,14 +1814,14 @@ "id": "api.post.send_notifications_and_forget.push_image_only", "translation": " uploaded one or more files in " }, - { - "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", - "translation": " uploaded one or more files" - }, { "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " uploaded one or more files in a direct message" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " uploaded one or more files" + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " in " @@ -4190,6 +4190,10 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Unable to find user on AD/LDAP server: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, { "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", "translation": "User not found in the users file." @@ -4198,10 +4202,6 @@ "id": "ent.migration.migratetosaml.username_already_used_by_other_user", "translation": "Username already used by another Mattermost user." }, - { - "id": "ent.migration.migratetosaml.email_already_used_by_other_user", - "translation": "Email already used by another SAML user." - }, { "id": "ent.saml.attribute.app_error", "translation": "SAML login was unsuccessful because one of the attributes is incorrect. Please contact your System Administrator." @@ -4978,10 +4978,6 @@ "id": "model.config.is_valid.site_url.app_error", "translation": "Site URL must be a valid URL and start with http:// or https://" }, - { - "id": "model.config.is_valid.websocket_url.app_error", - "translation": "Websocket URL must be a valid URL and start with ws:// or wss://" - }, { "id": "model.config.is_valid.site_url_email_batching.app_error", "translation": "Unable to enable email batching when SiteURL isn't set." @@ -5050,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Invalid value for webserver connection security." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "Websocket URL must be a valid URL and start with ws:// or wss://" + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Invalid value for write timeout." diff --git a/i18n/es.json b/i18n/es.json index fbb0c8538..e6a721f68 100644 --- a/i18n/es.json +++ b/i18n/es.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "No se puedo cargar el archivo. El encabezado no puede ser analizado." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "No se pudo subir los archivos. El número de archivos especificado es incorrecto." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "No se pudo cargar el archivo que supera las dimensiones máximas: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " subió uno o más archivos en un mensaje directo" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " subió uno o más archivos" + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " en " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Los Plugins se han deshabilitado." + "translation": "Los Plugins han sido inhabilitados. Por favor revisa los logs para más detalles." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "No se puede encontrar el usuario en el servidor AD/LDAP: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Dirección de correo electrónico ya se encuentra en uso por otro usuario SAML." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "Usuario no encontrado en el archivo de usuarios." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Nombre de usuario ya se encuentra en uso por otro usuario de Mattermost." + }, { "id": "ent.saml.attribute.app_error", "translation": "El inicio de sesión con SAML no tuvo éxito porque uno de sus atributos es incorrecto. Por favor, póngase en contacto con su Administrador del Sistema." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Valor no válido para la seguridad de conexión del servidor." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "La dirección URL del Websocket debe ser una dirección válida y comenzar con ws:// o wss://." + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Valor no válido para el tiempo de espera de escritura." diff --git a/i18n/fr.json b/i18n/fr.json index 6b6071d41..3a9fae840 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "Impossible d'envoyer le fichier. L'entête ne peut être analysé." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Unable to upload files. Incorrect number of files specified." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "Le fichier est au-dessus des limites de dimensions, il n'a pas pu être envoyé : {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " a envoyé un ou plusieurs fichiers dans un message personnel" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " a envoyé un ou plusieurs fichiers dans " + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " dans " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Les plugins ont été désactivés." + "translation": "Plugins have been disabled. Please check your logs for details." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Impossible de trouver l'utilisateur sur le serveur AD/LDAP : " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "User not found in the users file." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Username already used by another Mattermost user." + }, { "id": "ent.saml.attribute.app_error", "translation": "La connexion via SAML a échoué car un des attributs est incorrect. Veuillez contacter votre administrateur système." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Valeur invalide pour la sécurité de la connexion au serveur web." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "URL de site invalide. Il doit s'agir d'une URL valide et commencer par http:// ou https://." + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Valeur invalide pour le délai d'attente d'écriture." diff --git a/i18n/it.json b/i18n/it.json index 7b6d3f077..0918ececa 100644 --- a/i18n/it.json +++ b/i18n/it.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "Impossibile caricare il file. Lettura dell'intestazione fallita." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Impossibile caricare i file. Specifica numero di file non valido." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "Non è stato possibile caricare il file che supera le dimensioni massime: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " ha caricato uno o più file in un messaggio diretto" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " ha caricato uno o più file" + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " in " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Il plugin è stato disattivato." + "translation": "I plugin sono disattivati. Controllare i log per ulteriori informazioni." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Impossible trovare l'utente sul server AD/LDAP: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email in uso da un altro utente SAML." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "Utente non trovato nel file degli utenti." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Nome utente in uso da un altro utente Mattermost." + }, { "id": "ent.saml.attribute.app_error", "translation": "Il login SAML non ha avuto successo a causa di un attributo non corretto. Contattare l'amministratore di sistema." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Valore non valido per la sicurezza connessione webserver." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "L'URL del websocket deve essere un URL valido ed iniziare con ws:// o wss://" + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Valore non valido per il timeout scrittura." diff --git a/i18n/ja.json b/i18n/ja.json index b8fb048a5..b3e90c61f 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "ファイルをアップロードできません。ヘッダーを解析できません。" }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "ファイルをアップロードできませんでした。指定されたファイル数が正しくありません。" + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "最大サイズ以上のファイルはアップロードできません: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " ファイルをダイレクトメッセージにアップロードしました" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " ファイルをアップロードしました" + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " in " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "プラグインは無効化されています。" + "translation": "プラグインは無効化されています。詳しくはログを確認してください。" }, { "id": "app.plugin.extract.app_error", @@ -3700,7 +3708,7 @@ }, { "id": "app.team.join_user_to_team.max_accounts.app_error", - "translation": "このチームは登録ユーザー数の上限に達しました。システム管理者に上限値の設定を変更するように依頼してください。" + "translation": "このチームは登録ユーザー数の上限に達しました。システム管理者に上限値を上げるよう依頼してください。" }, { "id": "app.user_access_token.disabled", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "AD/LDAPサーバー上でユーザを見つけることができませんでした: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "電子メールアドレスは既に別のSAMLユーザーによって使用されています。" + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "ユーザーはユーザーファイル内で見つかりませんでした。" + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "ユーザー名は既に別のMattermostユーザーによって使用されています。" + }, { "id": "ent.saml.attribute.app_error", "translation": "SAMLログインは、属性の一つが不正のため、失敗しました。システム管理者に連絡してください。" @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "ウェブサーバーの接続のセキュリティーが不正な値です。" }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "ウェブソケットURLは、ws://またはwss://で始まる有効なURLにしてください。" + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "書き込みタイムアウトが不正な値です。" diff --git a/i18n/ko.json b/i18n/ko.json index b8eff6bca..79edba95c 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "파일을 업로드 할 수 없습니다. 머릿말 파싱에 실패하였습니다." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Unable to upload files. Incorrect number of files specified." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "File above maximum dimensions could not be uploaded: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " uploaded one or more files in a direct message" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " uploaded one or more files" + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " in " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Plugins have been disabled." + "translation": "Plugins have been disabled. Please check your logs for details." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "AD/LDAP 서버에서 사용자를 찾을 수 없음: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "User not found in the users file." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Username already used by another Mattermost user." + }, { "id": "ent.saml.attribute.app_error", "translation": "속성 중 하나가 올바르지 않아 SAML 로그인에 실패했습니다. 시스템 관리자에게 문의하십시오." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "webserver connection security에 대해 허용되지 않은 값입니다." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "WebRTC Gateway Websocket Url은 URL형식이여야 하며 ws:// 또는 wss://로 시작해야합니다." + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "write timeout에 대해 잘못된 값입니다." diff --git a/i18n/nl.json b/i18n/nl.json index a4ae85069..dda0ebab9 100644 --- a/i18n/nl.json +++ b/i18n/nl.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "Unable to upload file. Header cannot be parsed." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Unable to upload files. Incorrect number of files specified." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "File above maximum dimensions could not be uploaded: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " uploaded one or more files in a direct message" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " uploaded one or more files" + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " in " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Plugins have been disabled." + "translation": "Plugins have been disabled. Please check your logs for details." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Kon gebruiker niet vinden op de AD/LDAP server: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "User not found in the users file." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Username already used by another Mattermost user." + }, { "id": "ent.saml.attribute.app_error", "translation": "SAML aanmelding is mislukt vanwege verkeerde attributen. Neem contact op met de beheerder." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Invalid value for webserver connection security." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "WebRTC Gateway Websocket Url moet een geldige URL zijn en starten met ws:// of wss://." + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Invalid value for write timeout." diff --git a/i18n/pl.json b/i18n/pl.json index 209c00aeb..cf1911446 100644 --- a/i18n/pl.json +++ b/i18n/pl.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "Nie można pobrać pliku. Problem z parsowaniem nagłówka." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Unable to upload files. Incorrect number of files specified." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "Plik większy od maksymalnego rozmiaru nie został załadowany: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " Wysłał jeden lub więcej plików w bezpośredniej wiadomości" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " Wyślij jeden albo więcej plików w " + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": "w" @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Plugins have been disabled." + "translation": "Plugins have been disabled. Please check your logs for details." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Nie można znaleźć użytkownika na serwerze AD/LDAP:" }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "User not found in the users file." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Username already used by another Mattermost user." + }, { "id": "ent.saml.attribute.app_error", "translation": "Logowanie przez SAML nie powiodło się, ponieważ jeden z atrybutów jest niepoprawny. Skontaktuj się z administratorem systemu." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Nieprawidłowa wartość zabezpieczenia połeczenia dla serwera web." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "Adres URL strony musi być prawidłowy i zaczynać się od http:// lub https://" + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Nieprawidłowa wartość upłynięcia limitu czasu." diff --git a/i18n/pt-BR.json b/i18n/pt-BR.json index 314131254..44400b8c0 100644 --- a/i18n/pt-BR.json +++ b/i18n/pt-BR.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "Não foi possível carregar o arquivo. O cabeçalho não pode ser analisado." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Unable to upload files. Incorrect number of files specified." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "Arquivo acima das dimensões máximas não pode ser enviado: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " enviado um ou mais arquivos em uma mensagem direta" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " enviado um ou mais arquivos em " + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " em " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Os plugins foram desabilitados." + "translation": "Plugins have been disabled. Please check your logs for details." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Não foi possível localizar usuário no servidor AD/LDAP: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "User not found in the users file." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Username already used by another Mattermost user." + }, { "id": "ent.saml.attribute.app_error", "translation": "SAML login não foi bem sucedido porque um dos atributos está incorreto. Entre em contato com o Administrador do Sistema." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Valor inválido para segurança de conexão do servidor web." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "A URL Websocket do WebRTC Gateway deve ser uma URL válida e começar com ws:// ou wss://." + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Valor inválido para limite de escrita." diff --git a/i18n/ru.json b/i18n/ru.json index 5d1b6be49..2d2f9d91f 100644 --- a/i18n/ru.json +++ b/i18n/ru.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "Невозможно загрузить файл. Заголовок не может быть распознан." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Unable to upload files. Incorrect number of files specified." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "Размер файла превышает максимальный размер и не может быть загружен: {{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " Загружены один или несколько файлов для сообщения" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " Загружено один или несколько файлов в " + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " в " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Plugins have been disabled." + "translation": "Plugins have been disabled. Please check your logs for details." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Не удалось найти пользователя на сервере AD/LDAP: " }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "User not found in the users file." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Username already used by another Mattermost user." + }, { "id": "ent.saml.attribute.app_error", "translation": "Попытка входа с использованием SAML не удалась из-за некорректного атрибута. Пожалуйста, свяжитесь с системным администратором." @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Недопустимое значение настроек безопасности соединения веб-сервера." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "Ссылка на шлюз WebRTC должна быть действующей и начинаться с ws:// или wss://." + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Недопустимое значение для времени ожидания записи." diff --git a/i18n/tr.json b/i18n/tr.json index d33570001..8eb6e20e2 100644 --- a/i18n/tr.json +++ b/i18n/tr.json @@ -1036,7 +1036,7 @@ }, { "id": "api.context.mfa_required.app_error", - "translation": "Bu sunucuda çok aşamalı kimlik doğrulaması kullanılıyor." + "translation": "Bu sunucuda çok aşamalı kimlik doğrulaması zorunludur." }, { "id": "api.context.missing_teamid.app_error", @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "Dosya yüklenemedi. Üst bilgi işlenemedi." }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Belirtilen dosya sayısı hatalı olduğundan dosyalar yüklenemedi." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "Dosya en büyük boyutları aştığından yüklenemedi: {{.Filename}}" @@ -1808,12 +1812,16 @@ }, { "id": "api.post.send_notifications_and_forget.push_image_only", - "translation": " şunun içine bir ya da bir kaç dosya yükledi " + "translation": " şuraya bir ya da bir kaç dosya yükledi " }, { "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " bir doğrudan ileti içine bir ya da bir kaç dosya yükledi" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " bir ya da bir kaç dosya yükledi " + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " içinde " @@ -2184,7 +2192,7 @@ }, { "id": "api.team.add_user_to_team.missing_parameter.app_error", - "translation": "Takıma kullanıcı eklemek için parametre gerekli." + "translation": "Takıma kullanıcı eklemek için parametre zorunludur." }, { "id": "api.team.create_team.email_disabled.app_error", @@ -2300,11 +2308,11 @@ }, { "id": "api.team.move_channel.post.error", - "translation": "Kanal amacı iletisi gönderilemedi" + "translation": "Kanal taşındı iletisi gönderilemedi." }, { "id": "api.team.move_channel.success", - "translation": "This channel has been moved to this team from %v." + "translation": "Bu kanal %v üzerinden bu takıma taşındı." }, { "id": "api.team.permanent_delete_team.attempting.warn", @@ -3072,7 +3080,7 @@ }, { "id": "api.webhook.incoming.error", - "translation": "Could not decode the multipart payload of incoming webhook." + "translation": "Gelen web bağlantsının birden çok parçalı yükünün kodu çözülemedi." }, { "id": "api.webhook.init.debug", @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "Uygulama ekleri devre dışı bırakılmış." + "translation": "Uygulama ekleri devre dışı bırakıldı. Ayrıntılar için günlük kayıtlarına bakın." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "Kullanıcı AD/LDAP sunucusu üzerinde bulunamadı:" }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "E-posta başka bir SAML kullanıcısı tarafından kullanılıyor." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "Kullanıcı, kullanıcılar dosyasında bulunamadı." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Bu kullanıcı adı başka bir Mattermost kullanıcısı tarafından kullanılıyor." + }, { "id": "ent.saml.attribute.app_error", "translation": "Özniteliklerden biri hatalı olduğundan SAML oturumu açılamadı. Lütfen sistem yöneticiniz ile görüşün." @@ -4884,7 +4904,7 @@ }, { "id": "model.config.is_valid.message_export.export_type.app_error", - "translation": "Message export job ExportFormat must be one of either 'actiance' or 'globalrelay'" + "translation": "İleti dışa aktarma görevinin Dışa Aktarma Biçimi 'actiance' ya da 'genelaktarım' olmalıdır" }, { "id": "model.config.is_valid.message_export.file_location.app_error", @@ -4896,7 +4916,7 @@ }, { "id": "model.config.is_valid.message_export.global_relay_email_address.app_error", - "translation": "Message export job GlobalRelayEmailAddress must be set to a valid email address" + "translation": "İleti dışa aktarma görevinin GenelAktarıcıE-postaAdresi geçerli bir e-posta adresi olmalıdır" }, { "id": "model.config.is_valid.password_length.app_error", @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "Web sunucusu bağlantı güvenliği değeri geçersiz." }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "Web soketi adresi ws:// ya da wss:// ile başlayan geçerli bir adres olmalıdır" + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "Yazma zaman aşımı değeri geçersiz." @@ -7112,7 +7136,7 @@ }, { "id": "utils.mail.sendMail.attachments.write_error", - "translation": "Failed to write attachment to email" + "translation": "Ek dosya e-postaya eklenemedi" }, { "id": "utils.mail.send_mail.close.app_error", diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json index f799bba36..f476b48ed 100644 --- a/i18n/zh-CN.json +++ b/i18n/zh-CN.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "无法上传文件。标题无法被解析。" }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "无法上传文件。指定的文件数不匹配。" + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "无法上传超过最大尺寸的文件:{{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": " 在私信里上传一个或更多个文件" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": " 已上传一个或更多个文件" + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " 在 " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "插件已禁用。" + "translation": "日志已停用。请检查您的日志了解详情。" }, { "id": "app.plugin.extract.app_error", @@ -3700,7 +3708,7 @@ }, { "id": "app.team.join_user_to_team.max_accounts.app_error", - "translation": "这个团队已经达到允许的最大用户数量。请与系统管理员联系以设置更高的限制。" + "translation": "这个团队已经达到允许的最大帐号数量。请与系统管理员联系以设置更高的限制。" }, { "id": "app.user_access_token.disabled", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "未在 AD/LDAP 服务器上找到用户:" }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "电子邮箱地址已被其他 SAML 用户使用。" + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "没有在用户文件里找到用户。" + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "用户名已被其他 Mattermost 用户使用。" + }, { "id": "ent.saml.attribute.app_error", "translation": "SAML登入因不正确属性而失败。请联系您的系统管理员。" @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "错误的网页服务器连接安全值。" }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "Websocket 网址必须时有效的网址并且以 ws:// 或 wss:// 开头。" + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "错误的写入超时值。" @@ -7112,7 +7136,7 @@ }, { "id": "utils.mail.sendMail.attachments.write_error", - "translation": "Failed to write attachment to email" + "translation": "给邮件添加附件失败" }, { "id": "utils.mail.send_mail.close.app_error", diff --git a/i18n/zh-TW.json b/i18n/zh-TW.json index 292b05879..b9edc5edf 100644 --- a/i18n/zh-TW.json +++ b/i18n/zh-TW.json @@ -1368,6 +1368,10 @@ "id": "api.file.upload_file.bad_parse.app_error", "translation": "無法上傳檔案。無法解析標頭。" }, + { + "id": "api.file.upload_file.incorrect_number_of_files.app_error", + "translation": "Unable to upload files. Incorrect number of files specified." + }, { "id": "api.file.upload_file.large_image.app_error", "translation": "無法上傳超過最大尺寸的檔案:{{.Filename}}" @@ -1814,6 +1818,10 @@ "id": "api.post.send_notifications_and_forget.push_image_only_dm", "translation": "在直接傳訊中已上傳一個或更多檔案" }, + { + "id": "api.post.send_notifications_and_forget.push_image_only_no_channel", + "translation": "已上傳一個或更多檔案" + }, { "id": "api.post.send_notifications_and_forget.push_in", "translation": " 於 " @@ -3648,7 +3656,7 @@ }, { "id": "app.plugin.disabled.app_error", - "translation": "模組已被停用。" + "translation": "Plugins have been disabled. Please check your logs for details." }, { "id": "app.plugin.extract.app_error", @@ -4182,6 +4190,18 @@ "id": "ent.migration.migratetoldap.user_not_found", "translation": "找不到使用者,AD/LDAP 伺服器:" }, + { + "id": "ent.migration.migratetosaml.email_already_used_by_other_user", + "translation": "Email already used by another SAML user." + }, + { + "id": "ent.migration.migratetosaml.user_not_found_in_users_mapping_file", + "translation": "User not found in the users file." + }, + { + "id": "ent.migration.migratetosaml.username_already_used_by_other_user", + "translation": "Username already used by another Mattermost user." + }, { "id": "ent.saml.attribute.app_error", "translation": "由於不正確的屬性,SAML 登入失敗。請聯繫系統管理員。" @@ -5026,6 +5046,10 @@ "id": "model.config.is_valid.webserver_security.app_error", "translation": "網頁伺服器連線安全的值不正確。" }, + { + "id": "model.config.is_valid.websocket_url.app_error", + "translation": "WebRTC 閘道 Websocket 網址必須是以 ws:// 或 wss:// 起始的有效網址。" + }, { "id": "model.config.is_valid.write_timeout.app_error", "translation": "寫入逾時的值不正確。" -- cgit v1.2.3-1-g7c22 From e4ddad16bfe15ac1c1b6a0334df084bbb334d4e3 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 7 Mar 2018 12:43:26 -0600 Subject: plugin sandbox fixes (#8418) --- plugin/rpcplugin/sandbox/sandbox_linux.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugin/rpcplugin/sandbox/sandbox_linux.go b/plugin/rpcplugin/sandbox/sandbox_linux.go index dad485f68..4ade00cf2 100644 --- a/plugin/rpcplugin/sandbox/sandbox_linux.go +++ b/plugin/rpcplugin/sandbox/sandbox_linux.go @@ -267,7 +267,7 @@ func pivotRoot(newRoot string) error { func dropInheritableCapabilities() error { type capHeader struct { version uint32 - pid int + pid int32 } type capData struct { @@ -425,6 +425,15 @@ func checkSupportInNamespace() error { return errors.Wrapf(err, "unable to enable seccomp filter") } + if f, err := os.Create(os.DevNull); err != nil { + return errors.Wrapf(err, "unable to open os.DevNull") + } else { + defer f.Close() + if _, err = f.Write([]byte("foo")); err != nil { + return errors.Wrapf(err, "unable to write to os.DevNull") + } + } + return nil } -- cgit v1.2.3-1-g7c22 From 98e1231fcc6f12eedad2d5fd7a28bf9d349dd853 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 7 Mar 2018 13:53:07 -0600 Subject: respect plugin manifest webapp bundle_path (#8393) --- model/manifest.go | 5 +++++ plugin/pluginenv/environment.go | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/model/manifest.go b/model/manifest.go index 5ba4854b6..2b415dc62 100644 --- a/model/manifest.go +++ b/model/manifest.go @@ -173,6 +173,11 @@ func (m *Manifest) ClientManifest() *Manifest { cm.Name = "" cm.Description = "" cm.Backend = nil + if cm.Webapp != nil { + cm.Webapp = new(ManifestWebapp) + *cm.Webapp = *m.Webapp + cm.Webapp.BundlePath = "/static/" + m.Id + "_bundle.js" + } return cm } diff --git a/plugin/pluginenv/environment.go b/plugin/pluginenv/environment.go index f53021f74..adc9ddbde 100644 --- a/plugin/pluginenv/environment.go +++ b/plugin/pluginenv/environment.go @@ -8,6 +8,7 @@ import ( "fmt" "io/ioutil" "net/http" + "path/filepath" "sync" "github.com/pkg/errors" @@ -163,12 +164,24 @@ func (env *Environment) ActivatePlugin(id string) error { return fmt.Errorf("env missing webapp path, cannot activate plugin: %v", id) } - webappBundle, err := ioutil.ReadFile(fmt.Sprintf("%s/%s/webapp/%s_bundle.js", env.searchPath, id, id)) + bundlePath := filepath.Clean(bundle.Manifest.Webapp.BundlePath) + if bundlePath == "" || bundlePath[0] == '.' { + return fmt.Errorf("invalid webapp bundle path") + } + bundlePath = filepath.Join(env.searchPath, id, bundlePath) + + webappBundle, err := ioutil.ReadFile(bundlePath) if err != nil { - if supervisor != nil { - supervisor.Stop() + // Backwards compatibility for plugins where webapp.bundle_path was ignored. This should + // be removed eventually. + if webappBundle2, err2 := ioutil.ReadFile(fmt.Sprintf("%s/%s/webapp/%s_bundle.js", env.searchPath, id, id)); err2 == nil { + webappBundle = webappBundle2 + } else { + if supervisor != nil { + supervisor.Stop() + } + return errors.Wrapf(err, "unable to read webapp bundle: %v", id) } - return errors.Wrapf(err, "unable to read webapp bundle: %v", id) } err = ioutil.WriteFile(fmt.Sprintf("%s/%s_bundle.js", env.webappPath, id), webappBundle, 0644) -- cgit v1.2.3-1-g7c22