[MM-23727] Make channel validation consistent on the server (#14230)

* MM-23727 Ensure user ids not allowed in channel name:

MM-23727 Move channel name validation to model level

* MM-23727 Update wording
Этот коммит содержится в:
Farhan Munshi
2020-04-26 12:38:33 -04:00
коммит произвёл GitHub
родитель 036f9384b4
Коммит 7bc630a600
4 изменённых файлов: 17 добавлений и 20 удалений

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

@@ -259,10 +259,6 @@
"id": "api.channel.create_channel.direct_channel.app_error",
"translation": "Must use createDirectChannel API service for direct message channel creation."
},
{
"id": "api.channel.create_channel.invalid_character.app_error",
"translation": "Invalid character '__' in channel name for non-direct channel."
},
{
"id": "api.channel.create_channel.max_channel_limit.app_error",
"translation": "Unable to create more than {{.MaxChannelsPerTeam}} channels for current team."
@@ -427,10 +423,6 @@
"id": "api.channel.update_channel.deleted.app_error",
"translation": "The channel has been archived or deleted."
},
{
"id": "api.channel.update_channel.invalid_character.app_error",
"translation": "Invalid channel name. User ids are not permitted in channel name for non-direct message channels."
},
{
"id": "api.channel.update_channel.tried.app_error",
"translation": "Tried to perform an invalid update of the default channel {{.Channel}}."
@@ -4510,6 +4502,10 @@
"id": "model.channel.is_valid.id.app_error",
"translation": "Invalid Id."
},
{
"id": "model.channel.is_valid.name.app_error",
"translation": "Invalid channel name. User ids are not permitted in channel name for non-direct message channels."
},
{
"id": "model.channel.is_valid.purpose.app_error",
"translation": "Invalid purpose."