MM-28882:ignore guest ldap sync (#15936)
* add ignoreGuestsLdapSync to config, update interface * update interface Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
efc3304fe1
Коммит
f46661d7a9
@@ -20,7 +20,7 @@ type LdapInterface interface {
|
|||||||
MigrateIDAttribute(toAttribute string) error
|
MigrateIDAttribute(toAttribute string) error
|
||||||
GetGroup(groupUID string) (*model.Group, *model.AppError)
|
GetGroup(groupUID string) (*model.Group, *model.AppError)
|
||||||
GetAllGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *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)
|
UpdateProfilePictureIfNecessary(model.User, *model.Session)
|
||||||
GetADLdapIdFromSAMLId(authData string) string
|
GetADLdapIdFromSAMLId(authData string) string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2194,6 +2194,7 @@ type SamlSettings struct {
|
|||||||
Enable *bool `access:"authentication"`
|
Enable *bool `access:"authentication"`
|
||||||
EnableSyncWithLdap *bool `access:"authentication"`
|
EnableSyncWithLdap *bool `access:"authentication"`
|
||||||
EnableSyncWithLdapIncludeAuth *bool `access:"authentication"`
|
EnableSyncWithLdapIncludeAuth *bool `access:"authentication"`
|
||||||
|
IgnoreGuestsLdapSync *bool `access:"authentication"`
|
||||||
|
|
||||||
Verify *bool `access:"authentication"`
|
Verify *bool `access:"authentication"`
|
||||||
Encrypt *bool `access:"authentication"`
|
Encrypt *bool `access:"authentication"`
|
||||||
@@ -2248,6 +2249,10 @@ func (s *SamlSettings) SetDefaults() {
|
|||||||
s.EnableSyncWithLdapIncludeAuth = NewBool(false)
|
s.EnableSyncWithLdapIncludeAuth = NewBool(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.IgnoreGuestsLdapSync == nil {
|
||||||
|
s.IgnoreGuestsLdapSync = NewBool(false)
|
||||||
|
}
|
||||||
|
|
||||||
if s.EnableAdminAttribute == nil {
|
if s.EnableAdminAttribute == nil {
|
||||||
s.EnableAdminAttribute = NewBool(false)
|
s.EnableAdminAttribute = NewBool(false)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -649,6 +649,7 @@ func (ts *TelemetryService) trackConfig() {
|
|||||||
"enable": *cfg.SamlSettings.Enable,
|
"enable": *cfg.SamlSettings.Enable,
|
||||||
"enable_sync_with_ldap": *cfg.SamlSettings.EnableSyncWithLdap,
|
"enable_sync_with_ldap": *cfg.SamlSettings.EnableSyncWithLdap,
|
||||||
"enable_sync_with_ldap_include_auth": *cfg.SamlSettings.EnableSyncWithLdapIncludeAuth,
|
"enable_sync_with_ldap_include_auth": *cfg.SamlSettings.EnableSyncWithLdapIncludeAuth,
|
||||||
|
"ignore_guests_ldap_sync": *cfg.SamlSettings.IgnoreGuestsLdapSync,
|
||||||
"enable_admin_attribute": *cfg.SamlSettings.EnableAdminAttribute,
|
"enable_admin_attribute": *cfg.SamlSettings.EnableAdminAttribute,
|
||||||
"verify": *cfg.SamlSettings.Verify,
|
"verify": *cfg.SamlSettings.Verify,
|
||||||
"encrypt": *cfg.SamlSettings.Encrypt,
|
"encrypt": *cfg.SamlSettings.Encrypt,
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user