[MM-64402] Improve validation of imported attachments (#31201)
* Improve validation of imported attachments * Simplify multiple errors handling * Improve logic * Fix abs paths in tests * Remove redundant clean * Implement additional validation * Fix absolute paths in test * Add additional tests --------- Co-authored-by: Lorenzo Gallegos <1328683+enzowritescode@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
07239a5217
Коммит
d38c27f96f
@@ -5614,6 +5614,10 @@
|
||||
"id": "app.import.profile_image.read_data.app_error",
|
||||
"translation": "Failed to read profile image data."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_attachment_import_data.invalid_path.error",
|
||||
"translation": "Failed to validate attachment import data. Invalid path: \"{{.Path}}\""
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_bot_import_data.owner_missing.error",
|
||||
"translation": "Bot owner is missing"
|
||||
@@ -5678,6 +5682,10 @@
|
||||
"id": "app.import.validate_direct_channel_import_data.unknown_favoriter.error",
|
||||
"translation": "Direct channel can only be favorited by members. \"{{.Username}}\" is not a member."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_direct_post_import_data.attachment.error",
|
||||
"translation": "Failed to validate direct post attachment data."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_direct_post_import_data.channel_members_required.error",
|
||||
"translation": "Missing required direct post property: channel_members"
|
||||
@@ -5722,10 +5730,18 @@
|
||||
"id": "app.import.validate_emoji_import_data.image_missing.error",
|
||||
"translation": "Import emoji image field missing or blank."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_emoji_import_data.invalid_image_path.error",
|
||||
"translation": "Import emoji image field has an invalid path: \"{{.Path}}\""
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_emoji_import_data.name_missing.error",
|
||||
"translation": "Import emoji name field missing or blank."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_post_import_data.attachment.error",
|
||||
"translation": "Failed to validate post attachment data."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_post_import_data.channel_missing.error",
|
||||
"translation": "Missing required Post property: Channel."
|
||||
@@ -5782,6 +5798,10 @@
|
||||
"id": "app.import.validate_reaction_import_data.user_missing.error",
|
||||
"translation": "Missing required Reaction property: User."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_reply_import_data.attachment.error",
|
||||
"translation": "Failed to validate reply attachment data."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_reply_import_data.create_at_missing.error",
|
||||
"translation": "Missing required Reply property: create_at."
|
||||
@@ -5946,6 +5966,10 @@
|
||||
"id": "app.import.validate_user_import_data.guest_roles_conflict.error",
|
||||
"translation": "User roles are not consistent with guest status."
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_user_import_data.invalid_image_path.error",
|
||||
"translation": "User profile image path is invalid: \"{{.Path}}\""
|
||||
},
|
||||
{
|
||||
"id": "app.import.validate_user_import_data.last_name_length.error",
|
||||
"translation": "User Last Name is too long."
|
||||
|
||||
Ссылка в новой задаче
Block a user