diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-07 16:05:18 -0500 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-07 16:05:18 -0500 |
commit | ba5c7ea7719abbef792e8b9897dcfadf4d54bbab (patch) | |
tree | e1986ff36562366278fd134e7ce1793193828dcb /routers/dashboard.go | |
parent | 8e821c75d7432ffe7eb7d72ba479f6f68e620ad1 (diff) |
Add SignInRequire and SignOutRequire middleware
Diffstat (limited to 'routers/dashboard.go')
-rw-r--r-- | routers/dashboard.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/routers/dashboard.go b/routers/dashboard.go index 8eda9cf2..a7544500 100644 --- a/routers/dashboard.go +++ b/routers/dashboard.go @@ -5,14 +5,16 @@ package routers import ( - "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/routers/user" "github.com/martini-contrib/render" "github.com/martini-contrib/sessions" + + "github.com/gogits/gogs/modules/auth" + "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/routers/user" ) func Home(r render.Render, data base.TmplData, session sessions.Session) { - if user.IsSignedIn(session) { + if auth.IsSignedIn(session) { user.Dashboard(r, data, session) return } |