Add SignInRequire and SignOutRequire middleware

This commit is contained in:
Unknown committed 2014-03-07 16:05:18 -05:00
1 parent 8e821c75d7
commit ba5c7ea771
8 files changed
+135 -99

No files matched your search

+5 -3
View File
@@ -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
}