routers

package
v0.0.0-...-e1989bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2021 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IndexFill = func(ctx *context.Context) {
	userName := ctx.Input.Session("FilterUsers")
	if userName == nil {
		sys.LogNotice("未经登录,直接非法操作URI。管理注意了,可能有人在搞事!")
		ctx.Redirect(302, "/IsRight")
	}
}
View Source
var UserFill = func(ctx *context.Context) {
	right := ctx.Input.Session("FilterRight")
	if right == nil {
		sys.LogNotice("未经登录或权限不够,直接非法操作URI。管理注意了,可能有人在搞事!")
		ctx.Redirect(302, "/IsRight")
	} else if right.(int) > 0 {
		sys.LogNotice("未经登录且权限不够,直接非法操作URI。管理注意了,可能有人在搞事!")
		ctx.Redirect(302, "/IsRight")
	}
}
View Source
var UserFillForB2C = func(ctx *context.Context) {
	right := ctx.Input.Session("FilterRight")
	if right == nil {
		sys.LogNotice("未经登录或没有B2C权限,直接非法操作URI。管理注意了,可能有人在搞事!")
		ctx.Redirect(302, "/IsRight")
	} else if right.(int) > 1 {
		sys.LogNotice("未经登录且没有B2C权限,直接非法操作URI。管理注意了,可能有人在搞事!")
		ctx.Redirect(302, "/IsRight")
	}
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL