aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-03 01:37:49 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-03 01:37:49 -0400
commit7b60756f2c56314af715fa884388a5654bbfb791 (patch)
treeaab291357e23d6010e53dae80a51f66ed3294e20 /cmd
parente10096ee2e7985cfd73553f52b09994af025cd93 (diff)
downloadgitea-7b60756f2c56314af715fa884388a5654bbfb791.tar.gz
gitea-7b60756f2c56314af715fa884388a5654bbfb791.zip
Fix Collaborators cannot commit
Diffstat (limited to 'cmd')
-rw-r--r--cmd/serve.go2
-rw-r--r--cmd/update.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd/serve.go b/cmd/serve.go
index 73dea929ed..11cf97ad61 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -175,7 +175,7 @@ func runServ(k *cli.Context) {
qlog.Fatal("Unknown command")
}
- models.SetRepoEnvs(user.Id, user.Name, repoName)
+ models.SetRepoEnvs(user.Id, user.Name, repoName, repoUserName)
gitcmd := exec.Command(verb, repoPath)
gitcmd.Dir = base.RepoRootPath
diff --git a/cmd/update.go b/cmd/update.go
index b2c73f93cc..d7efe87f3c 100644
--- a/cmd/update.go
+++ b/cmd/update.go
@@ -76,10 +76,10 @@ func runUpdate(c *cli.Context) {
//updateEnv(args[0], args[1], args[2])
userName := os.Getenv("userName")
- userId := os.Getenv("userId")
- iUserId, _ := strconv.ParseInt(userId, 10, 64)
+ userId, _ := strconv.ParseInt(os.Getenv("userId"), 10, 64)
//repoId := os.Getenv("repoId")
+ repoUserName := os.Getenv("repoUserName")
repoName := os.Getenv("repoName")
- models.Update(args[0], args[1], args[2], userName, repoName, iUserId)
+ models.Update(args[0], args[1], args[2], userName, repoUserName, repoName, userId)
}