mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-28882:ignore guest ldap sync (#15936)
* add ignoreGuestsLdapSync to config, update interface * update interface Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user