summaryrefslogtreecommitdiffstats
path: root/modules/context/auth.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-25 14:51:01 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2016-11-25 14:53:59 +0800
commitfaabc76fd68b0ecccba1dc8dae47220b28cce05a (patch)
treed0a7f9b6417bc0bf596b3e0ed4f53e055d90a930 /modules/context/auth.go
parent6a28909f40ad1ff20d325d9be4ada87e5b75ce53 (diff)
downloadgitea-faabc76fd68b0ecccba1dc8dae47220b28cce05a.tar.gz
gitea-faabc76fd68b0ecccba1dc8dae47220b28cce05a.zip
Golint fixed for modules/context
Diffstat (limited to 'modules/context/auth.go')
-rw-r--r--modules/context/auth.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/context/auth.go b/modules/context/auth.go
index ff3d395541..0e5ae93a87 100644
--- a/modules/context/auth.go
+++ b/modules/context/auth.go
@@ -13,6 +13,7 @@ import (
macaron "gopkg.in/macaron.v1"
)
+// ToggleOptions contains required or check options
type ToggleOptions struct {
SignInRequired bool
SignOutRequired bool
@@ -20,6 +21,7 @@ type ToggleOptions struct {
DisableCSRF bool
}
+// Toggle returns toggle options as middleware
func Toggle(options *ToggleOptions) macaron.Handler {
return func(ctx *Context) {
// Cannot view any page before installation.