diff options
author | Antoine GIRARD <sapk@users.noreply.github.com> | 2017-09-05 15:45:18 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-09-05 21:45:18 +0800 |
commit | 7c417bbb0d8f3213f34db50f62013e20492d044f (patch) | |
tree | 45898dac8949fdd6c8c948f7d2a737e1871c7331 /routers | |
parent | 5f4210a9b0c8c42fb8f157c233ddc5aec6d9972d (diff) | |
download | gitea-7c417bbb0d8f3213f34db50f62013e20492d044f.tar.gz gitea-7c417bbb0d8f3213f34db50f62013e20492d044f.zip |
Only check at least one email gpg key (#2266)
* Only require one email (possibly not yet validated)
* Update message error and check validation of commit
* Add integrations tests
* Complete integration for import
* Add pre-check/optimization
* Add some test (not finished)
* Finish
* Fix fixtures
* Fix typo
* Don't guess key ID
Diffstat (limited to 'routers')
-rw-r--r-- | routers/user/setting.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go index b94f7dfb73..2c951eaf5f 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -378,9 +378,9 @@ func SettingsKeysPost(ctx *context.Context, form auth.AddKeyForm) { case models.IsErrGPGKeyIDAlreadyUsed(err): ctx.Data["Err_Content"] = true ctx.RenderWithErr(ctx.Tr("settings.gpg_key_id_used"), tplSettingsKeys, &form) - case models.IsErrGPGEmailNotFound(err): + case models.IsErrGPGNoEmailFound(err): ctx.Data["Err_Content"] = true - ctx.RenderWithErr(ctx.Tr("settings.gpg_key_email_not_found", err.(models.ErrGPGEmailNotFound).Email), tplSettingsKeys, &form) + ctx.RenderWithErr(ctx.Tr("settings.gpg_no_key_email_found"), tplSettingsKeys, &form) default: ctx.Handle(500, "AddPublicKey", err) } |