sys_authority.go 992 B

1234567891011121314151617181920212223
  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 AuthorityRouter struct {
  8. }
  9. func (s *AuthorityRouter) InitAuthorityRouter(Router *gin.RouterGroup) {
  10. authorityRouter := Router.Group("authority").Use(middleware.OperationRecord())
  11. var authorityApi = v1.ApiGroupApp.SystemApiGroup.AuthorityApi
  12. {
  13. authorityRouter.POST("createAuthority", authorityApi.CreateAuthority) // 创建角色
  14. authorityRouter.POST("deleteAuthority", authorityApi.DeleteAuthority) // 删除角色
  15. authorityRouter.PUT("updateAuthority", authorityApi.UpdateAuthority) // 更新角色
  16. authorityRouter.POST("copyAuthority", authorityApi.CopyAuthority) // 更新角色
  17. authorityRouter.POST("getAuthorityList", authorityApi.GetAuthorityList) // 获取角色列表
  18. authorityRouter.POST("setDataAuthority", authorityApi.SetDataAuthority) // 设置角色资源权限
  19. }
  20. }