diff options
author | Corey Hulen <corey@hulen.com> | 2017-10-31 08:37:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-31 08:37:34 -0700 |
commit | b3b46a01aae85594b9b3d2d8872d33d6812492a6 (patch) | |
tree | f01325932c6a5c04bdb5fcd8baf48ed14af9375d /model/config.go | |
parent | 1012bce8bb33fac86b928f227892cee331eb2de4 (diff) | |
download | chat-b3b46a01aae85594b9b3d2d8872d33d6812492a6.tar.gz chat-b3b46a01aae85594b9b3d2d8872d33d6812492a6.tar.bz2 chat-b3b46a01aae85594b9b3d2d8872d33d6812492a6.zip |
PLT-5813 support SAML sync via LDAP (#7668)
* PLT-5813 support SAML sync via LDAP
* Cleaning up based on review
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/model/config.go b/model/config.go index 17b7e87e6..ae62626de 100644 --- a/model/config.go +++ b/model/config.go @@ -394,6 +394,7 @@ type ClientRequirements struct { type LdapSettings struct { // Basic Enable *bool + EnableSync *bool LdapServer *string LdapPort *int ConnectionSecurity *string @@ -439,7 +440,9 @@ type LocalizationSettings struct { type SamlSettings struct { // Basic - Enable *bool + Enable *bool + EnableSyncWithLdap *bool + Verify *bool Encrypt *bool @@ -987,6 +990,12 @@ func (o *Config) SetDefaults() { o.LdapSettings.Enable = NewBool(false) } + // When unset should default to LDAP Enabled + if o.LdapSettings.EnableSync == nil { + o.LdapSettings.EnableSync = new(bool) + *o.LdapSettings.EnableSync = *o.LdapSettings.Enable + } + if o.LdapSettings.LdapServer == nil { o.LdapSettings.LdapServer = NewString("") } @@ -1209,6 +1218,11 @@ func (o *Config) SetDefaults() { o.SamlSettings.Enable = NewBool(false) } + if o.SamlSettings.EnableSyncWithLdap == nil { + o.SamlSettings.EnableSyncWithLdap = new(bool) + *o.SamlSettings.EnableSyncWithLdap = false + } + if o.SamlSettings.Verify == nil { o.SamlSettings.Verify = NewBool(true) } |