mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
* add updateSettingsToDB28 func and test * update DBversion const * migration func naming modification * feat(oauth): add sso, hide internal auth teaser and logout options. (#5039) * cleanup and make helper func for unit testing * dbversion update * feat(publicSettings): public settings response modification for OAuth SSO EE-608 (#5062) * feat(oauth): updated logout logic with logoutUrl. (#5064) * add exclusive token generation for OAuth * swagger annotation revision * add unit test * updates based on tech review feedback * feat(oauth): updated oauth settings model * feat(oauth): added oauth logout url * feat(oauth): fixed SSO toggle and logout issue. * set SSO to ON by default * update migrator unit test * set SSO to true by default for new instance * prevent applying the SSO logout url to the initial admin user Co-authored-by: fhanportainer <79428273+fhanportainer@users.noreply.github.com> Co-authored-by: Felix Han <felix.han@portainer.io>
11 lines
300 B
Go
11 lines
300 B
Go
package migrator
|
|
|
|
func (m *Migrator) updateSettingsToDB31() error {
|
|
legacySettings, err := m.settingsService.Settings()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
legacySettings.OAuthSettings.SSO = false
|
|
legacySettings.OAuthSettings.LogoutURI = ""
|
|
return m.settingsService.UpdateSettings(legacySettings)
|
|
}
|