2017-08-10 08:35:23 +00:00
|
|
|
package bolt
|
|
|
|
|
|
|
|
import "github.com/portainer/portainer"
|
|
|
|
|
2017-09-14 06:08:37 +00:00
|
|
|
func (m *Migrator) updateSettingsToDBVersion3() error {
|
2017-08-10 08:35:23 +00:00
|
|
|
legacySettings, err := m.SettingsService.Settings()
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
legacySettings.AuthenticationMethod = portainer.AuthenticationInternal
|
|
|
|
legacySettings.LDAPSettings = portainer.LDAPSettings{
|
|
|
|
TLSConfig: portainer.TLSConfiguration{},
|
|
|
|
SearchSettings: []portainer.LDAPSearchSettings{
|
|
|
|
portainer.LDAPSearchSettings{},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
err = m.SettingsService.StoreSettings(legacySettings)
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|