PLT-2707 Adding option to show DM list from all of server (#2871)
* PLT-2707 Adding option to show DM list from all of server * Fixing loc
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
6b06f49e89
Коммит
6611229cd7
@@ -29,6 +29,9 @@ const (
|
||||
GENERIC_NOTIFICATION = "generic"
|
||||
FULL_NOTIFICATION = "full"
|
||||
|
||||
DIRECT_MESSAGE_ANY = "any"
|
||||
DIRECT_MESSAGE_TEAM = "team"
|
||||
|
||||
FAKE_SETTING = "********************************"
|
||||
)
|
||||
|
||||
@@ -162,6 +165,7 @@ type TeamSettings struct {
|
||||
RestrictTeamNames *bool
|
||||
EnableCustomBrand *bool
|
||||
CustomBrandText *string
|
||||
RestrictDirectMessage *string
|
||||
}
|
||||
|
||||
type LdapSettings struct {
|
||||
@@ -315,6 +319,11 @@ func (o *Config) SetDefaults() {
|
||||
*o.TeamSettings.EnableOpenServer = false
|
||||
}
|
||||
|
||||
if o.TeamSettings.RestrictDirectMessage == nil {
|
||||
o.TeamSettings.RestrictDirectMessage = new(string)
|
||||
*o.TeamSettings.RestrictDirectMessage = DIRECT_MESSAGE_ANY
|
||||
}
|
||||
|
||||
if o.EmailSettings.EnableSignInWithEmail == nil {
|
||||
o.EmailSettings.EnableSignInWithEmail = new(bool)
|
||||
|
||||
@@ -520,6 +529,10 @@ func (o *Config) IsValid() *AppError {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.max_users.app_error", nil, "")
|
||||
}
|
||||
|
||||
if !(*o.TeamSettings.RestrictDirectMessage == DIRECT_MESSAGE_ANY || *o.TeamSettings.RestrictDirectMessage == DIRECT_MESSAGE_TEAM) {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.restrict_direct_message.app_error", nil, "")
|
||||
}
|
||||
|
||||
if len(o.SqlSettings.AtRestEncryptKey) < 32 {
|
||||
return NewLocAppError("Config.IsValid", "model.config.is_valid.encrypt_sql.app_error", nil, "")
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user