2018-06-19 11:15:10 +00:00
|
|
|
package migrator
|
2017-08-10 08:35:23 +00:00
|
|
|
|
2019-03-21 01:20:14 +00:00
|
|
|
import "github.com/portainer/portainer/api"
|
2017-08-10 08:35:23 +00:00
|
|
|
|
2017-09-14 06:08:37 +00:00
|
|
|
func (m *Migrator) updateSettingsToDBVersion3() error {
|
2018-06-19 11:15:10 +00:00
|
|
|
legacySettings, err := m.settingsService.Settings()
|
2017-08-10 08:35:23 +00:00
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
legacySettings.AuthenticationMethod = portainer.AuthenticationInternal
|
|
|
|
legacySettings.LDAPSettings = portainer.LDAPSettings{
|
|
|
|
TLSConfig: portainer.TLSConfiguration{},
|
|
|
|
SearchSettings: []portainer.LDAPSearchSettings{
|
|
|
|
portainer.LDAPSearchSettings{},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2018-06-19 11:15:10 +00:00
|
|
|
return m.settingsService.UpdateSettings(legacySettings)
|
2017-08-10 08:35:23 +00:00
|
|
|
}
|