feat(auth): don't clear client secret on update

pull/2749/head
Chaim Lev Ari 2018-12-30 18:39:16 +02:00
parent 2ee6f2780b
commit 996319d299
1 changed files with 5 additions and 0 deletions

View File

@ -71,7 +71,12 @@ func (handler *Handler) settingsUpdate(w http.ResponseWriter, r *http.Request) *
}
if payload.OAuthSettings != nil {
clientSecret := payload.OAuthSettings.ClientSecret
if clientSecret == "" {
clientSecret = settings.OAuthSettings.ClientSecret
}
settings.OAuthSettings = *payload.OAuthSettings
settings.OAuthSettings.ClientSecret = clientSecret
}
if payload.AllowBindMountsForRegularUsers != nil {