From d02e45f985ce371eb33fcca86bf80ca078be1d88 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Wed, 11 Feb 2015 12:04:01 -0500 Subject: [PATCH 01/10] better naming on #891 --- conf/app.ini | 2 +- conf/locale/locale_en-US.ini | 2 +- gogs.go | 2 +- models/webhook.go | 2 +- modules/setting/setting.go | 8 ++++---- templates/.VERSION | 2 +- templates/admin/config.tmpl | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/conf/app.ini b/conf/app.ini index e80d77a9ca..2019557bd4 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -90,7 +90,7 @@ TASK_INTERVAL = 1 ; Deliver timeout in seconds DELIVER_TIMEOUT = 5 ; Allow insecure certification -ALLOW_INSECURE_CERTIFICATION = false +SKIP_TLS_VERIFY = false [mailer] ENABLED = false diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini index 9e691171a4..6b59be7391 100644 --- a/conf/locale/locale_en-US.ini +++ b/conf/locale/locale_en-US.ini @@ -647,7 +647,7 @@ config.reset_password_code_lives = Reset Password Code Lives config.webhook_config = Webhook Configuration config.task_interval = Task Interval config.deliver_timeout = Deliver Timeout -config.allow_insecure_certification = Allow Insecure Certification +config.skip_tls_verify = Skip TLS Verify config.mailer_config = Mailer Configuration config.mailer_enabled = Enabled config.mailer_name = Name diff --git a/gogs.go b/gogs.go index b2f45b333f..eac5936218 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.5.13.0210 Beta" +const APP_VER = "0.5.13.0211 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/models/webhook.go b/models/webhook.go index 34349bb598..96af0b6967 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -315,7 +315,7 @@ func DeliverHooks() { req := httplib.Post(t.Url).SetTimeout(timeout, timeout). Header("X-Gogs-Delivery", t.Uuid). Header("X-Gogs-Event", string(t.EventType)). - SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.AllowInsecureCertification}) + SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify}) switch t.ContentType { case JSON: diff --git a/modules/setting/setting.go b/modules/setting/setting.go index d71a8cda55..6664c41907 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -69,9 +69,9 @@ var ( // Webhook settings. Webhook struct { - TaskInterval int - DeliverTimeout int - AllowInsecureCertification bool + TaskInterval int + DeliverTimeout int + SkipTLSVerify bool } // Repository settings. @@ -514,7 +514,7 @@ func newWebhookService() { sec := Cfg.Section("webhook") Webhook.TaskInterval = sec.Key("TASK_INTERVAL").MustInt(1) Webhook.DeliverTimeout = sec.Key("DELIVER_TIMEOUT").MustInt(5) - Webhook.AllowInsecureCertification = sec.Key("ALLOW_INSECURE_CERTIFICATION").MustBool() + Webhook.SkipTLSVerify = sec.Key("SKIP_TLS_VERIFY").MustBool() } func NewServices() { diff --git a/templates/.VERSION b/templates/.VERSION index 8f04f6d0da..2aad3653cb 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.13.0210 Beta \ No newline at end of file +0.5.13.0211 Beta \ No newline at end of file diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 5cf84beb99..6c328353bc 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -105,8 +105,8 @@
{{.Webhook.TaskInterval}} {{.i18n.Tr "tool.raw_minutes"}}
{{.i18n.Tr "admin.config.deliver_timeout"}}
{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}
-
{{.i18n.Tr "admin.config.allow_insecure_certification"}}
-
+
{{.i18n.Tr "admin.config.skip_tls_verify"}}
+
From 67a9416ae55ea765e3f405e00d89b0b8f3899330 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 12 Feb 2015 12:38:44 -0500 Subject: [PATCH 02/10] templates/user/auth/signin.tmpl: hide sign up prompt when registration is disabled #884 --- gogs.go | 2 +- models/models.go | 8 ++++---- templates/.VERSION | 2 +- templates/user/auth/signin.tmpl | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gogs.go b/gogs.go index eac5936218..76c6c71fc3 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.5.13.0211 Beta" +const APP_VER = "0.5.13.0212 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/models/models.go b/models/models.go index 3eeeabda3f..35e803834c 100644 --- a/models/models.go +++ b/models/models.go @@ -15,7 +15,7 @@ import ( "github.com/go-xorm/xorm" _ "github.com/lib/pq" - "github.com/gogits/gogs/models/migrations" + // "github.com/gogits/gogs/models/migrations" "github.com/gogits/gogs/modules/setting" ) @@ -136,9 +136,9 @@ func NewEngine() (err error) { return err } - if err = migrations.Migrate(x); err != nil { - return err - } + // if err = migrations.Migrate(x); err != nil { + // return err + // } if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil { return fmt.Errorf("sync database struct error: %v\n", err) diff --git a/templates/.VERSION b/templates/.VERSION index 2aad3653cb..6d13155b02 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.13.0211 Beta \ No newline at end of file +0.5.13.0212 Beta \ No newline at end of file diff --git a/templates/user/auth/signin.tmpl b/templates/user/auth/signin.tmpl index 78d6febb80..455df63ac8 100644 --- a/templates/user/auth/signin.tmpl +++ b/templates/user/auth/signin.tmpl @@ -26,10 +26,12 @@      {{if not .IsSocialLogin}}{{.i18n.Tr "auth.forget_password"}}{{end}} + {{if .ShowRegistrationButton}} + {{end}} {{if and (not .IsSocialLogin) .OauthEnabled}}
-
- - - {{.i18n.Tr "repo.goget_meta_helper" | Str2html}} -