2021-07-16 12:08:11 +00:00
|
|
|
package system
|
2019-12-12 05:21:16 +00:00
|
|
|
|
|
|
|
|
import (
|
2021-08-23 15:13:24 +00:00
|
|
|
"github.com/flipped-aurora/gin-vue-admin/server/middleware"
|
2019-12-12 05:21:16 +00:00
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
|
)
|
|
|
|
|
|
2021-12-06 04:44:26 +00:00
|
|
|
type CasbinRouter struct{}
|
2021-07-17 06:18:52 +00:00
|
|
|
|
|
|
|
|
func (s *CasbinRouter) InitCasbinRouter(Router *gin.RouterGroup) {
|
|
|
|
|
casbinRouter := Router.Group("casbin").Use(middleware.OperationRecord())
|
2021-09-20 13:40:23 +00:00
|
|
|
casbinRouterWithoutRecord := Router.Group("casbin")
|
2019-12-12 05:21:16 +00:00
|
|
|
{
|
2021-07-17 06:18:52 +00:00
|
|
|
casbinRouter.POST("updateCasbin", casbinApi.UpdateCasbin)
|
2021-09-20 13:40:23 +00:00
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
casbinRouterWithoutRecord.POST("getPolicyPathByAuthorityId", casbinApi.GetPolicyPathByAuthorityId)
|
2019-12-12 05:21:16 +00:00
|
|
|
}
|
|
|
|
|
}
|