aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-22 05:30:53 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-22 05:30:53 -0400
commit5435b259ccdfc7795183d54fec9ba673f2938297 (patch)
tree0d8280f1073c8b10e80b5eed18f49a1813bc7c88
parent2a9da4b8e54736c3a8f7ecc41f3c75fdcfb70f9b (diff)
parentdbdaf934e1b8fab06361266268bb55d30b352f37 (diff)
Merge branch 'master' of github.com:gogits/gogs into dev
-rw-r--r--conf/app.ini2
-rw-r--r--modules/base/conf.go4
-rw-r--r--routers/user/user.go6
-rw-r--r--serve.go10
-rw-r--r--templates/admin/config.tmpl4
-rw-r--r--templates/user/signup.tmpl2
6 files changed, 14 insertions, 14 deletions
diff --git a/conf/app.ini b/conf/app.ini
index 7dbbf600..25fd4109 100644
--- a/conf/app.ini
+++ b/conf/app.ini
@@ -53,7 +53,7 @@ RESET_PASSWD_CODE_LIVE_MINUTES = 180
; User need to confirm e-mail for registration
REGISTER_EMAIL_CONFIRM = false
; Does not allow register and admin create account only
-DISENABLE_REGISTERATION = false
+DISABLE_REGISTRATION = false
; User must sign in to view anything.
REQUIRE_SIGNIN_VIEW = false
; Cache avatar as picture
diff --git a/modules/base/conf.go b/modules/base/conf.go
index 48ba4658..abb67f6d 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -84,7 +84,7 @@ var (
var Service struct {
RegisterEmailConfirm bool
- DisenableRegisteration bool
+ DisableRegistration bool
RequireSignInView bool
EnableCacheAvatar bool
NotifyMail bool
@@ -116,7 +116,7 @@ var logLevels = map[string]string{
func newService() {
Service.ActiveCodeLives = Cfg.MustInt("service", "ACTIVE_CODE_LIVE_MINUTES", 180)
Service.ResetPwdCodeLives = Cfg.MustInt("service", "RESET_PASSWD_CODE_LIVE_MINUTES", 180)
- Service.DisenableRegisteration = Cfg.MustBool("service", "DISENABLE_REGISTERATION", false)
+ Service.DisableRegistration = Cfg.MustBool("service", "DISABLE_REGISTRATION", false)
Service.RequireSignInView = Cfg.MustBool("service", "REQUIRE_SIGNIN_VIEW", false)
Service.EnableCacheAvatar = Cfg.MustBool("service", "ENABLE_CACHE_AVATAR", false)
}
diff --git a/routers/user/user.go b/routers/user/user.go
index 91b51cee..7decd72d 100644
--- a/routers/user/user.go
+++ b/routers/user/user.go
@@ -169,8 +169,8 @@ func SignUp(ctx *middleware.Context) {
ctx.Data["Title"] = "Sign Up"
ctx.Data["PageIsSignUp"] = true
- if base.Service.DisenableRegisteration {
- ctx.Data["DisenableRegisteration"] = true
+ if base.Service.DisableRegistration {
+ ctx.Data["DisableRegistration"] = true
ctx.HTML(200, "user/signup")
return
}
@@ -208,7 +208,7 @@ func SignUpPost(ctx *middleware.Context, form auth.RegisterForm) {
ctx.Data["Title"] = "Sign Up"
ctx.Data["PageIsSignUp"] = true
- if base.Service.DisenableRegisteration {
+ if base.Service.DisableRegistration {
ctx.Handle(403, "user.SignUpPost", nil)
return
}
diff --git a/serve.go b/serve.go
index 4e410b62..32122795 100644
--- a/serve.go
+++ b/serve.go
@@ -116,8 +116,8 @@ func runServ(k *cli.Context) {
repoPath := strings.Trim(args, "'")
rr := strings.SplitN(repoPath, "/", 2)
if len(rr) != 2 {
- println("Unavilable repository", args)
- qlog.Fatalf("Unavilable repository %v", args)
+ println("Unavailable repository", args)
+ qlog.Fatalf("Unavailable repository %v", args)
}
repoUserName := rr[0]
repoName := strings.TrimSuffix(rr[1], ".git")
@@ -136,7 +136,7 @@ func runServ(k *cli.Context) {
case isWrite:
has, err := models.HasAccess(user.LowerName, path.Join(repoUserName, repoName), models.AU_WRITABLE)
if err != nil {
- println("Inernel error:", err)
+ println("Internal error:", err)
qlog.Fatal(err)
} else if !has {
println("You have no right to write this repository")
@@ -155,13 +155,13 @@ func runServ(k *cli.Context) {
has, err := models.HasAccess(user.Name, path.Join(repoUserName, repoName), models.AU_READABLE)
if err != nil {
- println("Inernel error")
+ println("Internal error")
qlog.Fatal(err)
}
if !has {
has, err = models.HasAccess(user.Name, repoPath, models.AU_WRITABLE)
if err != nil {
- println("Inernel error")
+ println("Internal error")
qlog.Fatal(err)
}
}
diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl
index 8263763d..d25d4027 100644
--- a/templates/admin/config.tmpl
+++ b/templates/admin/config.tmpl
@@ -62,8 +62,8 @@
<dl class="dl-horizontal admin-dl-horizontal">
<dt>Register Email Confirmation</dt>
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
- <dt>Disenable Registeration</dt>
- <dd><i class="fa fa{{if .Service.DisenableRegisteration}}-check{{end}}-square-o"></i></dd>
+ <dt>Disable Registration</dt>
+ <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
<dt>Require Sign In View</dt>
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
<dt>Mail Notification</dt>
diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl
index d6af74c1..578ffa9e 100644
--- a/templates/user/signup.tmpl
+++ b/templates/user/signup.tmpl
@@ -3,7 +3,7 @@
<div class="container" id="body">
<form action="/user/sign_up" method="post" class="form-horizontal card" id="login-card">
{{.CsrfTokenHtml}}
- {{if .DisenableRegisteration}}
+ {{if .DisableRegistration}}
Sorry, registration has been disabled. Please contact the site administrator.
{{else}}
{{if .IsSocialLogin}}