Files
gin-vue-admin/server/router/system/sys_authority.go
T
PiexlMax(奇淼 d143b326b4 v2.9.0Beta版本发布
- 优化了AI规则,更利于大家规范化使用VibeCoding
- skills增加了在线板块,可以直接下载在线的skills。
- skill增加了一键打包能力
- 角色页面可以把角色可以直接分配给用户
- 菜单页面可以直接把菜单分配给角色
- API页面可以直接把API分配给角色
- 升级了AWS S3的版本
- 修复了富文本组件样式缺失的bug
- dashboard页面样式调整
- 优化了插件市场的UI,增加了分享和点赞能力
- 优化了vite环境变量的使用规则
2026-03-06 18:14:46 +08:00

26 lines
1.2 KiB
Go

package system
import (
"github.com/flipped-aurora/gin-vue-admin/server/middleware"
"github.com/gin-gonic/gin"
)
type AuthorityRouter struct{}
func (s *AuthorityRouter) InitAuthorityRouter(Router *gin.RouterGroup) {
authorityRouter := Router.Group("authority").Use(middleware.OperationRecord())
authorityRouterWithoutRecord := Router.Group("authority")
{
authorityRouter.POST("createAuthority", authorityApi.CreateAuthority) // 创建角色
authorityRouter.POST("deleteAuthority", authorityApi.DeleteAuthority) // 删除角色
authorityRouter.PUT("updateAuthority", authorityApi.UpdateAuthority) // 更新角色
authorityRouter.POST("copyAuthority", authorityApi.CopyAuthority) // 拷贝角色
authorityRouter.POST("setDataAuthority", authorityApi.SetDataAuthority) // 设置角色资源权限
authorityRouter.POST("setRoleUsers", authorityApi.SetRoleUsers) // 全量覆盖角色关联用户
}
{
authorityRouterWithoutRecord.POST("getAuthorityList", authorityApi.GetAuthorityList) // 获取角色列表
authorityRouterWithoutRecord.GET("getUsersByAuthority", authorityApi.GetUsersByAuthority) // 获取角色关联用户ID列表
}
}