mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
added field name to ldap system console errors (#3593)
This commit is contained in:
36
i18n/en.json
36
i18n/en.json
@@ -2715,6 +2715,42 @@
|
||||
"id": "model.config.is_valid.ldap_sync_interval.app_error",
|
||||
"translation": "Invalid sync interval time. Must be at least one minute."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_server",
|
||||
"translation": "LDAP field \"LDAP Server\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_basedn",
|
||||
"translation": "LDAP field \"BaseDN\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_bind_username",
|
||||
"translation": "LDAP field \"Bind Username\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_bind_password",
|
||||
"translation": "LDAP field \"Bind Password\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_firstname",
|
||||
"translation": "LDAP field \"First Name Attribute\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_lastname",
|
||||
"translation": "LDAP field \"Last Name Attribute\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_email",
|
||||
"translation": "LDAP field \"Email Attribute\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_username",
|
||||
"translation": "LDAP field \"Username Attribute\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.ldap_id",
|
||||
"translation": "LDAP field \"ID Attribute\" is required."
|
||||
},
|
||||
{
|
||||
"id": "model.config.is_valid.listen_address.app_error",
|
||||
"translation": "Invalid listen address for service settings Must be set."
|
||||
|
||||
@@ -895,16 +895,40 @@ func (o *Config) IsValid() *AppError {
|
||||
}
|
||||
|
||||
if *o.LdapSettings.Enable {
|
||||
if *o.LdapSettings.LdapServer == "" ||
|
||||
*o.LdapSettings.BaseDN == "" ||
|
||||
*o.LdapSettings.BindUsername == "" ||
|
||||
*o.LdapSettings.BindPassword == "" ||
|
||||
*o.LdapSettings.FirstNameAttribute == "" ||
|
||||
*o.LdapSettings.LastNameAttribute == "" ||
|
||||
*o.LdapSettings.EmailAttribute == "" ||
|
||||
*o.LdapSettings.UsernameAttribute == "" ||
|
||||
*o.LdapSettings.IdAttribute == "" {
|
||||
return NewLocAppError("Config.IsValid", "Required LDAP field missing", nil, "")
|
||||
if *o.LdapSettings.LdapServer == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_server", nil, "")
|
||||
}
|
||||
|
||||
if *o.LdapSettings.BaseDN == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_basedn", nil, "")
|
||||
}
|
||||
|
||||
if *o.LdapSettings.BindUsername == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_bind_username", nil, "")
|
||||
}
|
||||
|
||||
if *o.LdapSettings.BindPassword == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_bind_password", nil, "")
|
||||
}
|
||||
|
||||
if *o.LdapSettings.FirstNameAttribute == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_firstname", nil, "")
|
||||
}
|
||||
|
||||
if *o.LdapSettings.LastNameAttribute == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_lastname", nil, "")
|
||||
}
|
||||
|
||||
if *o.LdapSettings.EmailAttribute == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_email", nil, "")
|
||||
}
|
||||
|
||||
if *o.LdapSettings.UsernameAttribute == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_username", nil, "")
|
||||
}
|
||||
|
||||
if *o.LdapSettings.IdAttribute == "" {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.ldap_id", nil, "")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user