summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2017-09-05 15:45:18 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2017-09-05 21:45:18 +0800
commit7c417bbb0d8f3213f34db50f62013e20492d044f (patch)
tree45898dac8949fdd6c8c948f7d2a737e1871c7331 /routers
parent5f4210a9b0c8c42fb8f157c233ddc5aec6d9972d (diff)
downloadgitea-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.go4
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)
}