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
@@ -43,7 +43,7 @@ export class DeployNotificationService {
if (!provider) {
return {
status: 'not_configured',
message: 'Missing NOTIFICATION_PROVIDER',
message: '缺少 NOTIFICATION_PROVIDER',
};
}
@@ -63,7 +63,7 @@ export class DeployNotificationService {
: {
status: 'not_configured',
provider,
message: `Missing ${webhookKey}`,
message: `缺少 ${webhookKey}`,
};
}
@@ -77,7 +77,7 @@ export class DeployNotificationService {
return {
status: 'skipped',
channel: health.provider ?? 'none',
reason: health.message ?? 'Notification provider is not configured',
reason: health.message ?? '通知平台尚未配置',
};
}
@@ -85,7 +85,7 @@ export class DeployNotificationService {
return {
status: 'failed',
channel: health.provider ?? 'none',
reason: health.message ?? 'Notification provider is unavailable',
reason: health.message ?? '通知平台不可用',
};
}
@@ -100,7 +100,7 @@ export class DeployNotificationService {
reason:
error instanceof Error
? redactSensitive({ message: error.message }).message
: 'Unknown notification error',
: '未知通知错误',
};
}
}
@@ -196,7 +196,7 @@ export class DeployNotificationService {
});
if (!response.ok) {
throw new Error(`${provider} webhook request failed: ${response.status}`);
throw new Error(`${provider} webhook 请求失败:${response.status}`);
}
}
+2 -2
View File
@@ -12,7 +12,7 @@ export class WeComClient {
healthSummary(): { status: 'ok' | 'not_configured'; message?: string } {
return this.config.get('WECOM_WEBHOOK_URL', { infer: true })
? { status: 'ok' }
: { status: 'not_configured', message: 'Missing WECOM_WEBHOOK_URL' };
: { status: 'not_configured', message: '缺少 WECOM_WEBHOOK_URL' };
}
async sendMarkdown(message: WeComMarkdownMessage): Promise<WeComSendResult> {
@@ -32,7 +32,7 @@ export class WeComClient {
});
if (!response.ok) {
throw new IntegrationRequestError('wecom', 'WeCom webhook request failed', {
throw new IntegrationRequestError('wecom', '企微 webhook 请求失败', {
status: response.status,
message: redactSensitive(message),
});