Mercurial > gemma
changeset 3549:30f6647b8856
import_configuration: if password was persisted it should be repersisted again, if missing in frontend
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 31 May 2019 13:31:44 +0200 |
parents | f3102fa16a69 |
children | c0f8f9ba21a7 |
files | pkg/controllers/importconfig.go |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/controllers/importconfig.go Fri May 31 12:45:30 2019 +0200 +++ b/pkg/controllers/importconfig.go Fri May 31 13:31:44 2019 +0200 @@ -98,10 +98,13 @@ _, oldCron := pc.Attributes.Get("cron") session, _ := auth.GetSession(req) + oldPasswd := pc.Attributes["password"] pc.User = session.User pc.Attributes = common.Attributes{} pc.Attributes.Marshal(config) - + if oldPasswd != "" && pc.Attributes["password"] == "" { + pc.Attributes["password"] = oldPasswd + } cron, newCron := pc.Attributes.Get("cron") var tx *sql.Tx