sys_casbin.go 870 B

123456789101112131415161718192021222324252627
  1. package request
  2. // CasbinInfo Casbin info structure
  3. type CasbinInfo struct {
  4. Path string `json:"path"` // 路径
  5. Method string `json:"method"` // 方法
  6. }
  7. // CasbinInReceive Casbin structure for input parameters
  8. type CasbinInReceive struct {
  9. AuthorityId uint `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/changePassword", Method: "POST"},
  18. {Path: "/user/setUserAuthority", Method: "POST"},
  19. {Path: "/user/getUserInfo", Method: "GET"},
  20. {Path: "/user/setSelfInfo", Method: "PUT"},
  21. {Path: "/fileUploadAndDownload/upload", Method: "POST"},
  22. {Path: "/sysDictionary/findSysDictionary", Method: "GET"},
  23. }
  24. }