summaryrefslogtreecommitdiffstats
path: root/modules/context/auth.go
diff options
context:
space:
mode:
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.