casbin.go 668 B

123456789101112131415161718192021222324
  1. package request
  2. type CasbinInfo struct {
  3. Path string `json:"path"`
  4. Action string `json:"action"`
  5. }
  6. type CasbinInReceive struct {
  7. RoleID int `json:"roleId"`
  8. CasbinInfos []CasbinInfo `json:"casbinInfos"`
  9. }
  10. func DefaultCasbin() []CasbinInfo {
  11. return []CasbinInfo{
  12. {Path: "/menu/getMenu", Action: "POST"},
  13. {Path: "/jwt/jsonInBlacklist", Action: "POST"},
  14. {Path: "/base/login", Action: "POST"},
  15. {Path: "/user/admin_register", Action: "POST"},
  16. {Path: "/user/changePassword", Action: "POST"},
  17. {Path: "/user/setUserAuthority", Action: "POST"},
  18. {Path: "/user/setUserInfo", Action: "PUT"},
  19. {Path: "/user/getUserInfo", Action: "GET"},
  20. }
  21. }