mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Add SignInRequire and SignOutRequire middleware
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user