From a65366bbe1aadea8baaffbdadab58a5b631d9417 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 6 Jul 2026 13:52:56 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E7=99=BB=E5=BD=95=E6=8A=A5projectId?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/controller/user/mine/mine-controller.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/ui/certd-server/src/controller/user/mine/mine-controller.ts b/packages/ui/certd-server/src/controller/user/mine/mine-controller.ts index 25addd26e..60cde7283 100644 --- a/packages/ui/certd-server/src/controller/user/mine/mine-controller.ts +++ b/packages/ui/certd-server/src/controller/user/mine/mine-controller.ts @@ -1,4 +1,4 @@ -import { AccessGetter, AccessService, BaseController, Constants, SysSettingsService } from "@certd/lib-server"; +import { AccessGetter, AccessService, BaseController, Constants, isEnterprise, SysSettingsService } from "@certd/lib-server"; import { ALL, Body, Controller, Inject, Post, Provide } from "@midwayjs/core"; import { PasskeyService } from "../../../modules/login/service/passkey-service.js"; import { RoleService } from "../../../modules/sys/authority/service/role-service.js"; @@ -55,16 +55,13 @@ export class MineController extends BaseController { //@ts-ignore user.needInitPassword = needInitPassword; - const { projectId } = await this.getProjectUserIdRead(); - const userProjectQuery = this.accessService.buildUserProjectQuery(userId, projectId); const existingAccess = await this.accessService.findOne({ - where: { type: "acmeAccount", subtype: "letsencrypt", ...userProjectQuery }, + where: { type: "acmeAccount", subtype: "letsencrypt", userId }, }); if (!existingAccess) { //@ts-ignore user.needInitAccount = true; } - return this.ok(user); } From d176f9cc0ebd051a614bfac74d1616d1945fc9a3 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 6 Jul 2026 14:34:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8passkey=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../certd-server/src/controller/user/mine/mine-controller.ts | 2 +- .../certd-server/src/modules/login/service/passkey-service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/certd-server/src/controller/user/mine/mine-controller.ts b/packages/ui/certd-server/src/controller/user/mine/mine-controller.ts index 60cde7283..301ec9dcd 100644 --- a/packages/ui/certd-server/src/controller/user/mine/mine-controller.ts +++ b/packages/ui/certd-server/src/controller/user/mine/mine-controller.ts @@ -1,4 +1,4 @@ -import { AccessGetter, AccessService, BaseController, Constants, isEnterprise, SysSettingsService } from "@certd/lib-server"; +import { AccessGetter, AccessService, BaseController, Constants, SysSettingsService } from "@certd/lib-server"; import { ALL, Body, Controller, Inject, Post, Provide } from "@midwayjs/core"; import { PasskeyService } from "../../../modules/login/service/passkey-service.js"; import { RoleService } from "../../../modules/sys/authority/service/role-service.js"; diff --git a/packages/ui/certd-server/src/modules/login/service/passkey-service.ts b/packages/ui/certd-server/src/modules/login/service/passkey-service.ts index 740e2b43a..8fa17766b 100644 --- a/packages/ui/certd-server/src/modules/login/service/passkey-service.ts +++ b/packages/ui/certd-server/src/modules/login/service/passkey-service.ts @@ -30,8 +30,8 @@ export class PasskeyService extends BaseService { rpName = siteInfo.title || rpName; } - const rpId = ctx.hostname; - const origin = ctx.origin; + const origin = ctx.headers.origin || ctx.origin; + const rpId = origin ? new URL(origin).hostname : ctx.hostname; return { rpName, From d3e4677ea4fac8e7533749d7f4187e410489e536 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 6 Jul 2026 19:56:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?perf(pipeline):=20=E5=B0=86=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=8E=86=E5=8F=B2=E4=BF=9D=E7=95=99=E6=9D=A1=E6=95=B0?= =?UTF-8?q?=E4=BB=8E30=E8=B0=83=E6=95=B4=E4=B8=BA100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一修改所有新建流水线场景下的默认keepHistoryCount配置,提升历史记录留存数量 --- .../certd-client/src/views/certd/pipeline/cert-upload/use.tsx | 2 +- .../ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx | 2 +- .../ui/certd-client/src/views/certd/pipeline/template/use.tsx | 2 +- .../src/modules/pipeline/service/pipeline-service.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/ui/certd-client/src/views/certd/pipeline/cert-upload/use.tsx b/packages/ui/certd-client/src/views/certd/pipeline/cert-upload/use.tsx index 602f2d11a..ac7f6be20 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/cert-upload/use.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/cert-upload/use.tsx @@ -207,7 +207,7 @@ export function useCertUpload() { const { id } = await api.Save({ title: pipeline.title, content: JSON.stringify(pipeline), - keepHistoryCount: 30, + keepHistoryCount: 100, type: "cert_upload", groupId: form.groupId, }); diff --git a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx index f532c1534..756561a70 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/certd-form/use.tsx @@ -605,7 +605,7 @@ export function useCertPipelineCreator({ formWrapperRef }: { formWrapperRef: Ref const { id } = await api.Save({ title: pipeline.title, content: JSON.stringify(pipeline), - keepHistoryCount: 30, + keepHistoryCount: 100, type: "cert", groupId, addToMonitorEnabled: form.addToMonitorEnabled, diff --git a/packages/ui/certd-client/src/views/certd/pipeline/template/use.tsx b/packages/ui/certd-client/src/views/certd/pipeline/template/use.tsx index 67e3465a7..82283db2b 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/template/use.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/template/use.tsx @@ -160,7 +160,7 @@ export async function createPipelineByTemplate(opts: { templateId: number; title return await templateApi.CreatePipelineByTemplate({ title, content: JSON.stringify(pipeline), - keepHistoryCount: keepHistoryCount ?? 30, + keepHistoryCount: keepHistoryCount ?? 100, groupId, templateId, }); diff --git a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts index 26bad0575..9d69ba5bd 100644 --- a/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts +++ b/packages/ui/certd-server/src/modules/pipeline/service/pipeline-service.ts @@ -1376,7 +1376,7 @@ export class PipelineService extends BaseService { bean.status = "none"; bean.type = "cert_auto"; bean.disabled = false; - bean.keepHistoryCount = 30; + bean.keepHistoryCount = 100; bean.projectId = req.projectId; await this.save(bean);