M-API-ADMIN-INFO P2 | Admin 端点接入 AdminJwtGuard 鉴权 #160

Closed
opened 2026-06-09 21:48:38 +08:00 by wangdl · 1 comment
Owner

审查发现(F3)

AdminReadingController 所有端点未添加 @UseGuards(AdminJwtGuard),当前任何人都可访问管理接口。

修复

@Controller("admin/learning")
@UseGuards(AdminJwtGuard)  // ← 添加此装饰器
// @Roles("ADMIN", "SUPER_ADMIN")  // 可选:角色限制

代码位置

src/modules/reading-event/admin-reading.controller.ts:4

## 审查发现(F3) `AdminReadingController` 所有端点未添加 `@UseGuards(AdminJwtGuard)`,当前任何人都可访问管理接口。 ## 修复 ```typescript @Controller("admin/learning") @UseGuards(AdminJwtGuard) // ← 添加此装饰器 // @Roles("ADMIN", "SUPER_ADMIN") // 可选:角色限制 ``` ## 代码位置 `src/modules/reading-event/admin-reading.controller.ts:4`
Author
Owner

修复

@UseGuards(AdminJwtGuard) 已添加到 AdminReadingController

## 修复 `@UseGuards(AdminJwtGuard)` 已添加到 `AdminReadingController`。
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/api-server#160
No description provided.