diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-03 01:37:49 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-03 01:37:49 -0400 |
commit | 7b60756f2c56314af715fa884388a5654bbfb791 (patch) | |
tree | aab291357e23d6010e53dae80a51f66ed3294e20 /routers | |
parent | e10096ee2e7985cfd73553f52b09994af025cd93 (diff) | |
download | gitea-7b60756f2c56314af715fa884388a5654bbfb791.tar.gz gitea-7b60756f2c56314af715fa884388a5654bbfb791.zip |
Fix Collaborators cannot commit
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/http.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go index b58d19489b..a6189ff2c3 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -60,8 +60,8 @@ func Http(ctx *middleware.Context, params martini.Params) { // only public pull don't need auth isPublicPull := !repo.IsPrivate && isPull var askAuth = !isPublicPull || base.Service.RequireSignInView - var authUser *models.User + var authUsername, passwd string // check access if askAuth { @@ -79,7 +79,7 @@ func Http(ctx *middleware.Context, params martini.Params) { ctx.Handle(401, "no basic auth and digit auth", nil) return } - authUsername, passwd, err := basicDecode(auths[1]) + authUsername, passwd, err = basicDecode(auths[1]) if err != nil { ctx.Handle(401, "no basic auth and digit auth", nil) return @@ -133,7 +133,7 @@ func Http(ctx *middleware.Context, params martini.Params) { newCommitId := fields[1] refName := fields[2] - models.Update(refName, oldCommitId, newCommitId, username, reponame, authUser.Id) + models.Update(refName, oldCommitId, newCommitId, authUsername, username, reponame, authUser.Id) } } } |