aboutsummaryrefslogtreecommitdiffstats
path: root/modules/middleware/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/middleware/context.go')
-rw-r--r--modules/middleware/context.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index 744cdfc10c..cb3cbabca6 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -14,7 +14,6 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/auth"
- "github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
)
@@ -112,10 +111,7 @@ func InitContext() martini.Handler {
ctx.Data["SignedUser"] = user
ctx.Data["SignedUserId"] = user.Id
ctx.Data["SignedUserName"] = user.LowerName
-
- if ctx.User.IsAdmin || ctx.User.LowerName == base.AdminName {
- ctx.Data["IsAdmin"] = true
- }
+ ctx.Data["IsAdmin"] = ctx.User.IsAdmin
}
ctx.Data["PageStartTime"] = time.Now()