Some checks failed
CI / init (push) Has been cancelled
CI / Frontend node 18.16.0 (push) Has been cancelled
CI / Backend go (1.22) (push) Has been cancelled
CI / devops-test (1.22, 18.16.0) (push) Has been cancelled
CI / release-pr (push) Has been cancelled
CI / release-please (push) Has been cancelled
CI / devops-prod (1.22, 18.x) (push) Has been cancelled
CI / docker (push) Has been cancelled
28 lines
870 B
Go
28 lines
870 B
Go
package request
|
|
|
|
// CasbinInfo Casbin info structure
|
|
type CasbinInfo struct {
|
|
Path string `json:"path"` // 路径
|
|
Method string `json:"method"` // 方法
|
|
}
|
|
|
|
// CasbinInReceive 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/changePassword", Method: "POST"},
|
|
{Path: "/user/setUserAuthority", Method: "POST"},
|
|
{Path: "/user/getUserInfo", Method: "GET"},
|
|
{Path: "/user/setSelfInfo", Method: "PUT"},
|
|
{Path: "/fileUploadAndDownload/upload", Method: "POST"},
|
|
{Path: "/sysDictionary/findSysDictionary", Method: "GET"},
|
|
}
|
|
}
|