feat: 接入真实登录与成员权限

- auth/members/messages: 新增超级管理员登录、成员权限和密码消息流程
- agent-config/agent: 支持服务端保存 Agent 配置并取消未配置 mock 成功结果
- projects/deploy-runs/settings: 按当前用户权限保护真实接口
- prisma: 新增用户、项目权限和平台消息表结构
This commit is contained in:
湛兮
2026-06-12 00:38:23 +08:00
parent cf1bebf625
commit bc3aa31289
83 changed files with 3844 additions and 378 deletions
+9 -3
View File
@@ -1,17 +1,23 @@
/**
* 审计日志查询入口只返回脱敏后的最近记录。
*/
import { Controller, Get } from '@nestjs/common';
import { Controller, Get, UseGuards } from '@nestjs/common';
import { ApiOkResponse, ApiTags } from '@nestjs/swagger';
import { AdminOnlyMessage } from '../auth/admin-only-message.decorator';
import { AuthGuard } from '../auth/auth.guard';
import { PasswordChangeGuard } from '../auth/password-change.guard';
import { SuperAdminGuard } from '../auth/super-admin.guard';
import { AuditRecordSummary, AuditService } from './audit.service';
@ApiTags('audit')
@ApiTags('审计日志')
@Controller('audit-logs')
@UseGuards(AuthGuard, PasswordChangeGuard, SuperAdminGuard)
@AdminOnlyMessage('无权限访问审计日志')
export class AuditController {
constructor(private readonly auditService: AuditService) {}
@Get()
@ApiOkResponse({ description: 'Recent sanitized audit records.' })
@ApiOkResponse({ description: '查询最近的脱敏审计记录。' })
async listRecentRecords(): Promise<AuditRecordSummary[]> {
return this.auditService.getRecentRecords();
}