整体优化完善接口与数据权限检查

This commit is contained in:
2026-03-28 14:18:11 +08:00
parent 51c377964d
commit 22cb2d50d3
21 changed files with 161 additions and 98 deletions

View File

@@ -12,8 +12,8 @@ import (
"github.com/gofiber/fiber/v2"
)
// PageResourceBatch 分页查询套餐提取记录
func PageResourceBatch(ctx *fiber.Ctx) error {
// PageBatch 分页查询套餐提取记录
func PageBatch(ctx *fiber.Ctx) error {
// 检查权限
authCtx, err := auth.GetAuthCtx(ctx).PermitUser()
if err != nil {
@@ -59,7 +59,7 @@ type PageResourceBatchReq struct {
// PageBatchByAdmin 分页查询所有提取记录
func PageBatchByAdmin(c *fiber.Ctx) error {
_, err := auth.GetAuthCtx(c).PermitAdmin()
_, err := auth.GetAuthCtx(c).PermitAdmin(core.ScopeBatchRead)
if err != nil {
return err
}