diff --git a/einterfaces/ldap.go b/einterfaces/ldap.go index bcc7b854e0..3784251a08 100644 --- a/einterfaces/ldap.go +++ b/einterfaces/ldap.go @@ -20,7 +20,7 @@ type LdapInterface interface { MigrateIDAttribute(toAttribute string) error GetGroup(groupUID string) (*model.Group, *model.AppError) GetAllGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError) - FirstLoginSync(userID, userAuthService, userAuthData, email string) *model.AppError + FirstLoginSync(user *model.User, userAuthService, userAuthData, email string) *model.AppError UpdateProfilePictureIfNecessary(model.User, *model.Session) GetADLdapIdFromSAMLId(authData string) string } diff --git a/model/config.go b/model/config.go index bae125e618..82f272dc16 100644 --- a/model/config.go +++ b/model/config.go @@ -2194,6 +2194,7 @@ type SamlSettings struct { Enable *bool `access:"authentication"` EnableSyncWithLdap *bool `access:"authentication"` EnableSyncWithLdapIncludeAuth *bool `access:"authentication"` + IgnoreGuestsLdapSync *bool `access:"authentication"` Verify *bool `access:"authentication"` Encrypt *bool `access:"authentication"` @@ -2248,6 +2249,10 @@ func (s *SamlSettings) SetDefaults() { s.EnableSyncWithLdapIncludeAuth = NewBool(false) } + if s.IgnoreGuestsLdapSync == nil { + s.IgnoreGuestsLdapSync = NewBool(false) + } + if s.EnableAdminAttribute == nil { s.EnableAdminAttribute = NewBool(false) } diff --git a/services/telemetry/telemetry.go b/services/telemetry/telemetry.go index 028e92e586..b4867aba6a 100644 --- a/services/telemetry/telemetry.go +++ b/services/telemetry/telemetry.go @@ -649,6 +649,7 @@ func (ts *TelemetryService) trackConfig() { "enable": *cfg.SamlSettings.Enable, "enable_sync_with_ldap": *cfg.SamlSettings.EnableSyncWithLdap, "enable_sync_with_ldap_include_auth": *cfg.SamlSettings.EnableSyncWithLdapIncludeAuth, + "ignore_guests_ldap_sync": *cfg.SamlSettings.IgnoreGuestsLdapSync, "enable_admin_attribute": *cfg.SamlSettings.EnableAdminAttribute, "verify": *cfg.SamlSettings.Verify, "encrypt": *cfg.SamlSettings.Encrypt,