PLT-5479: Import Slack team without emails. (#5597)
Use a fake email address for now, and inform the user doing the import clearly that this has been done.
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
2e5ebac615
Коммит
f513879ffc
@@ -155,6 +155,11 @@ func SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Buffer) map
|
|||||||
}
|
}
|
||||||
|
|
||||||
email := sUser.Profile["email"]
|
email := sUser.Profile["email"]
|
||||||
|
if email == "" {
|
||||||
|
email = sUser.Username + "@example.com"
|
||||||
|
log.WriteString(utils.T("api.slackimport.slack_add_users.missing_email_address", map[string]interface{}{"Email": email, "Username": sUser.Username}))
|
||||||
|
l4g.Warn(utils.T("api.slackimport.slack_add_users.missing_email_address.warn", map[string]interface{}{"Email": email, "Username": sUser.Username}))
|
||||||
|
}
|
||||||
|
|
||||||
password := model.NewId()
|
password := model.NewId()
|
||||||
|
|
||||||
|
|||||||
@@ -1719,6 +1719,14 @@
|
|||||||
"id": "api.slackimport.slack_add_channels.failed_to_add_user",
|
"id": "api.slackimport.slack_add_channels.failed_to_add_user",
|
||||||
"translation": "Failed to add user to channel: {{.Username}}\r\n"
|
"translation": "Failed to add user to channel: {{.Username}}\r\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "api.slackimport.slack_add_users.missing_email_address",
|
||||||
|
"translation": "User {{.Username}} does not have an email address in the Slack export. Using {{.Email}} as a placeholder. The user should update their email address once logged in to the system.\r\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "api.slackimport.slack_add_users.missing_email_address.warn",
|
||||||
|
"translation": "User {{.Username}} does not have an email address in the Slack export. Using {{.Email}} as a placeholder. The user should update their email address once logged in to the system."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "api.slackimport.slack_add_channels.import_failed",
|
"id": "api.slackimport.slack_add_channels.import_failed",
|
||||||
"translation": "Failed to import: {{.DisplayName}}\r\n"
|
"translation": "Failed to import: {{.DisplayName}}\r\n"
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user