From 2158e6fc43a17e8290f2ae1123d67ba01fab0f3f Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 19 Nov 2015 11:40:00 -0500 Subject: fix #1997 --- modules/middleware/repo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index a78e079d8d..7780fa5cd5 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -275,7 +275,7 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler { } // Admin has super access. - if ctx.User.IsAdmin { + if ctx.IsSigned && ctx.User.IsAdmin { ctx.Repo.AccessMode = models.ACCESS_MODE_OWNER } else { mode, err := models.AccessLevel(ctx.User, repo) -- cgit v1.2.3