mirror of https://github.com/portainer/portainer
fix(auth): correctly calculate LDAP teamsync [EE-3704] (#7293)
parent
54145ce949
commit
4fb1880ddc
|
@ -95,8 +95,10 @@ func generatePublicSettings(appSettings *portainer.Settings) *publicSettingsResp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if LDAP authentication is on, compose the related fields from application settings
|
//if LDAP authentication is on, compose the related fields from application settings
|
||||||
if publicSettings.AuthenticationMethod == portainer.AuthenticationLDAP {
|
if publicSettings.AuthenticationMethod == portainer.AuthenticationLDAP && appSettings.LDAPSettings.GroupSearchSettings != nil {
|
||||||
publicSettings.TeamSync = len(appSettings.LDAPSettings.GroupSearchSettings) > 0
|
if len(appSettings.LDAPSettings.GroupSearchSettings) > 0 {
|
||||||
|
publicSettings.TeamSync = len(appSettings.LDAPSettings.GroupSearchSettings[0].GroupBaseDN) > 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return publicSettings
|
return publicSettings
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue