liujiandao
2024-01-11 40e540f8ca398fee68f4520dbebd6db6fe2e164c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package request
 
// Casbin info structure
type CasbinInfo struct {
    Path   string `json:"path"`   // 路径
    Method string `json:"method"` // 方法
}
 
// Casbin structure for input parameters
type CasbinInReceive struct {
    AuthorityId uint         `json:"authorityId"` // 权限id
    CasbinInfos []CasbinInfo `json:"casbinInfos"`
}
 
func DefaultCasbin() []CasbinInfo {
    return []CasbinInfo{
        {Path: "/menu/getMenu", Method: "POST"},
        {Path: "/jwt/jsonInBlacklist", Method: "POST"},
        {Path: "/base/login", Method: "POST"},
        {Path: "/user/admin_register", Method: "POST"},
        {Path: "/user/changePassword", Method: "POST"},
        {Path: "/user/setUserAuthority", Method: "POST"},
        {Path: "/user/setUserInfo", Method: "PUT"},
        {Path: "/user/getUserInfo", Method: "GET"},
        {Path: "/city/list", Method: "GET"},
    }
}