1
0
Fork 0
forked from forgejo/forgejo

Support private repo

This commit is contained in:
Unknown 2014-04-11 21:47:39 -04:00
parent d6dac160df
commit 33aa4f7438
13 changed files with 87 additions and 31 deletions

View file

@ -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)