summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-11 21:47:39 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-11 21:47:39 -0400
commit33aa4f74380ab117673a1cc30bead3a7f2b3cb4b (patch)
treeac6c7c1ebebb86260545386c7ce923593e4d5046 /routers/repo/repo.go
parentd6dac160dfcac068b31bda9316ddc3d4919e3288 (diff)
downloadgitea-33aa4f74380ab117673a1cc30bead3a7f2b3cb4b.tar.gz
gitea-33aa4f74380ab117673a1cc30bead3a7f2b3cb4b.zip
Support private repo
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 3859b43e87..3ffbde1a1e 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -41,7 +41,7 @@ func CreatePost(ctx *middleware.Context, form auth.CreateRepoForm) {
}
_, err := models.CreateRepository(ctx.User, form.RepoName, form.Description,
- form.Language, form.License, form.Visibility == "private", form.InitReadme == "on")
+ form.Language, form.License, form.Private == "on", form.InitReadme == "on")
if err == nil {
log.Trace("%s Repository created: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, form.RepoName)
ctx.Redirect("/" + ctx.User.Name + "/" + form.RepoName)
@@ -72,7 +72,7 @@ func MirrorPost(ctx *middleware.Context, form auth.CreateRepoForm) {
}
_, err := models.CreateRepository(ctx.User, form.RepoName, form.Description,
- "", form.License, form.Visibility == "private", false)
+ "", form.License, form.Private == "on", false)
if err == nil {
log.Trace("%s Repository created: %s/%s", ctx.Req.RequestURI, ctx.User.LowerName, form.RepoName)
ctx.Redirect("/" + ctx.User.Name + "/" + form.RepoName)