chore: check off Tasks 4-7 (all controllers decorated)
This commit is contained in:
@@ -1458,7 +1458,7 @@ git commit -m "feat(rbac): register RbacModule and PermissionGuard in AppModule"
|
||||
- Consumes: `@RequirePermission` (Task 3)
|
||||
- Produces: 所有业务接口受权限守卫保护
|
||||
|
||||
- [ ] **Step 1: 为各 Controller 添加 @RequirePermission**
|
||||
- [x] **Step 1: 为各 Controller 添加 @RequirePermission**
|
||||
|
||||
对每个 Controller,在已有的 `@UseGuards(JwtAuthGuard)` 基础上,为每个路由方法添加 `@RequirePermission` 装饰器。权限码映射如下:
|
||||
|
||||
@@ -1545,7 +1545,7 @@ async remove(...) { ... }
|
||||
- `bills.controller.ts` 中 `exportExcel` 需要 `bill:export-excel`,`exportPdf` 需要 `bill:export-pdf`
|
||||
- `dashboard.controller.ts` 和 `operation-logs.controller.ts` 的类级别加 `@RequirePermission('dashboard:view')` 和 `@RequirePermission('log:view')` 可以减少重复
|
||||
|
||||
- [ ] **Step 2: 编译验证**
|
||||
- [x] **Step 2: 编译验证**
|
||||
|
||||
```bash
|
||||
cd backend && npx tsc --noEmit
|
||||
@@ -1553,7 +1553,7 @@ cd backend && npx tsc --noEmit
|
||||
|
||||
预期:无类型错误。所有 Controller 的装饰器正确引用。
|
||||
|
||||
- [ ] **Step 3: Commit**
|
||||
- [x] **Step 3: Commit**
|
||||
|
||||
```bash
|
||||
git add backend/src/students/ backend/src/rooms/ backend/src/occupancies/ backend/src/expenses/ backend/src/bills/ backend/src/deposits/ backend/src/classrooms/ backend/src/tenants/ backend/src/classroom-rentals/ backend/src/dashboard/ backend/src/operation-logs/
|
||||
|
||||
Reference in New Issue
Block a user