summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-19 11:40:00 -0500
committerUnknwon <u@gogs.io>2015-11-19 11:40:00 -0500
commit2158e6fc43a17e8290f2ae1123d67ba01fab0f3f (patch)
treeb2e691d9176da79b4e990ebaa7acf5414f60241d /modules
parentee686f62315006df6d85ad0f74dfc6119b920469 (diff)
downloadgitea-2158e6fc43a17e8290f2ae1123d67ba01fab0f3f.tar.gz
gitea-2158e6fc43a17e8290f2ae1123d67ba01fab0f3f.zip
fix #1997
Diffstat (limited to 'modules')
-rw-r--r--modules/middleware/repo.go2
1 files changed, 1 insertions, 1 deletions
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)