sys_casbin.go 773 字节
Newer Older
1 2 3 4
package request

// Casbin info structure
type CasbinInfo struct {
5 6
	Path   string `json:"path"`   // 路径
	Method string `json:"method"` // 方法
7 8 9 10
}

// Casbin structure for input parameters
type CasbinInReceive struct {
11
	AuthorityId string       `json:"authorityId"` // 权限id
12 13
	CasbinInfos []CasbinInfo `json:"casbinInfos"`
}
14 15

func DefaultCasbin() []CasbinInfo {
16 17 18 19
	return []CasbinInfo{
		{Path: "/menu/getMenu", Method: "POST"},
		{Path: "/jwt/jsonInBlacklist", Method: "POST"},
		{Path: "/base/login", Method: "POST"},
S
songzhibin97 已提交
20
		{Path: "/user/admin_register", Method: "POST"},
21 22 23 24 25
		{Path: "/user/changePassword", Method: "POST"},
		{Path: "/user/setUserAuthority", Method: "POST"},
		{Path: "/user/setUserInfo", Method: "PUT"},
		{Path: "/user/getUserInfo", Method: "GET"},
	}
26
}