chore: check off Task 6 (AppModule registration)

This commit is contained in:
2026-07-02 11:49:12 +08:00
parent dc4835165d
commit f53b6c447c
2 changed files with 4 additions and 4 deletions

View File

@@ -1324,7 +1324,7 @@ git commit -m "feat(rbac): add RbacController with role CRUD, permissions tree,
**Interfaces:**
- Produces: PermissionGuard 作为 APP_GUARD 全局生效RbacModule 初始化种子数据
- [ ] **Step 1: 修改 AppModule**
- [x] **Step 1: 修改 AppModule**
`backend/src/app.module.ts` 中:
@@ -1419,7 +1419,7 @@ import { PermissionGuard } from './auth/guards/permission.guard';
export class AppModule {}
```
- [ ] **Step 2: 启动验证**
- [x] **Step 2: 启动验证**
```bash
cd backend && npm run start:dev
@@ -1430,7 +1430,7 @@ cd backend && npm run start:dev
- 无崩溃无错误
- 尝试不带 token 访问任意接口 → 返回 403
- [ ] **Step 3: Commit**
- [x] **Step 3: Commit**
```bash
git add backend/src/app.module.ts

View File

@@ -21,7 +21,7 @@
- [x] 3.2 创建 PermissionGuard从 JWT payload 中读取 permissions 数组,与装饰器标注的权限做匹配
- [x] 3.3 修改 JwtStrategy 和 AuthService.login登录时调用 getUserPermissions将 permissions 写入 JWT payload
- [x] 3.4 修改 AuthService.validateUser/profile返回用户信息时携带角色和权限列表
- [ ] 3.5 全局注册 PermissionGuard或在各模块按需注册
- [x] 3.5 全局注册 PermissionGuard或在各模块按需注册
## 4. 现有接口批量加守卫