summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-17 04:47:42 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-17 04:47:42 -0400
commit0d6aafdef54183069a789054e95ffd080d1c09dd (patch)
treee6f67a105ed481e8e4728ff9375b5aed684acc80 /modules
parent5c3054c3b7387df56db8c193db7c662802fb4a50 (diff)
downloadgitea-0d6aafdef54183069a789054e95ffd080d1c09dd.tar.gz
gitea-0d6aafdef54183069a789054e95ffd080d1c09dd.zip
Mirror fix
Diffstat (limited to 'modules')
-rw-r--r--modules/middleware/repo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index 7a4157367e..db29bd116e 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -6,6 +6,7 @@ package middleware
import (
"errors"
+ "strings"
"github.com/codegangsta/martini"
@@ -23,7 +24,7 @@ func RepoAssignment(redirect bool) martini.Handler {
)
// get repository owner
- ctx.Repo.IsOwner = ctx.IsSigned && ctx.User.LowerName == params["username"]
+ ctx.Repo.IsOwner = ctx.IsSigned && ctx.User.LowerName == strings.ToLower(params["username"])
if !ctx.Repo.IsOwner {
user, err = models.GetUserByName(params["username"])