sys_casbin.go 767 B

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