From 0d6aafdef54183069a789054e95ffd080d1c09dd Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 17 Mar 2014 04:47:42 -0400 Subject: [PATCH] Mirror fix --- modules/middleware/repo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 7a4157367..db29bd116 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"])