You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
633 B

3 years ago
  1. package system
  2. import (
  3. v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
  4. "github.com/flipped-aurora/gin-vue-admin/server/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type CasbinRouter struct {
  8. }
  9. func (s *CasbinRouter) InitCasbinRouter(Router *gin.RouterGroup) {
  10. casbinRouter := Router.Group("casbin").Use(middleware.OperationRecord())
  11. casbinRouterWithoutRecord := Router.Group("casbin")
  12. var casbinApi = v1.ApiGroupApp.SystemApiGroup.CasbinApi
  13. {
  14. casbinRouter.POST("updateCasbin", casbinApi.UpdateCasbin)
  15. }
  16. {
  17. casbinRouterWithoutRecord.POST("getPolicyPathByAuthorityId", casbinApi.GetPolicyPathByAuthorityId)
  18. }
  19. }