diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-17 14:03:58 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-17 14:03:58 -0400 |
commit | e51afe4621cfbc8380994c818981f42a097e3ec5 (patch) | |
tree | 74e26a6c8fa60ab82f9f1e791693cd178adc5a10 /modules/middleware/auth.go | |
parent | 9d3b003add6bee6cb23cbac5d32f6fb3d4fd50cb (diff) | |
download | gitea-e51afe4621cfbc8380994c818981f42a097e3ec5.tar.gz gitea-e51afe4621cfbc8380994c818981f42a097e3ec5.zip |
Add postgres support, clean code, code review
Diffstat (limited to 'modules/middleware/auth.go')
-rw-r--r-- | modules/middleware/auth.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go index 743b982976..cf7bee4d22 100644 --- a/modules/middleware/auth.go +++ b/modules/middleware/auth.go @@ -8,6 +8,7 @@ import ( "github.com/codegangsta/martini" ) +// SignInRequire requires user to sign in. func SignInRequire(redirect bool) martini.Handler { return func(ctx *Context) { if !ctx.IsSigned { @@ -19,6 +20,7 @@ func SignInRequire(redirect bool) martini.Handler { } } +// SignOutRequire requires user to sign out. func SignOutRequire() martini.Handler { return func(ctx *Context) { if ctx.IsSigned { |