diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-16 02:28:28 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-16 02:28:28 -0400 |
commit | 50df58a893b745abff74bdcbb9be3fc0d10d21f4 (patch) | |
tree | 7753f6095090e3f0f60a15223fdf3074f0dfb11f /serve.go | |
parent | 828c89de996c328bb3759d90be8a8a35b4d9cdc0 (diff) | |
parent | 795dad786189aeba9c61452e395bb4ecf5fc2cb9 (diff) | |
download | gitea-50df58a893b745abff74bdcbb9be3fc0d10d21f4.tar.gz gitea-50df58a893b745abff74bdcbb9be3fc0d10d21f4.zip |
Merge branch 'master' of github.com:gogits/gogs
Diffstat (limited to 'serve.go')
-rw-r--r-- | serve.go | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -73,6 +73,17 @@ func runServ(*cli.Context) { if strings.HasSuffix(repoName, ".git") { repoName = repoName[:len(repoName)-4] } + + os.Setenv("userName", user.Name) + os.Setenv("userId", strconv.Itoa(int(user.Id))) + repo, err := models.GetRepositoryByName(user, repoName) + if err != nil { + println("Unavilable repository", err) + return + } + os.Setenv("repoId", strconv.Itoa(int(repo.Id))) + os.Setenv("repoName", repoName) + isWrite := In(verb, COMMANDS_WRITE) isRead := In(verb, COMMANDS_READONLY) |