From 3c07a4a96259a363de5862c6986df8709fe4a101 Mon Sep 17 00:00:00 2001 From: greysonfang Date: Wed, 25 Dec 2024 17:37:00 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=94=A8=E6=88=B7=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E8=A7=86=E8=A7=92=20=E6=9D=83=E9=99=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96=20#11138?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/devops/auth/pojo/enum/HandoverAction.kt | 4 ++-- .../service/RbacPermissionHandoverApplicationService.kt | 9 ++++----- support-files/i18n/notify/template_zh_CN.yaml | 8 ++++---- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/enum/HandoverAction.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/enum/HandoverAction.kt index f88de5e99b9..a0adb00ce70 100644 --- a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/enum/HandoverAction.kt +++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/enum/HandoverAction.kt @@ -6,10 +6,10 @@ enum class HandoverAction( val content: String ) { // 审批成功 - AGREE(1, "已通过", "您提交的权限交接单 %s 已被 %s 通过。恭喜您完成交接。"), + AGREE(1, "已通过", "您提交的权限交接单 %s 已被 %s 通过。恭喜您完成交接。"), // 审批驳回 - REJECT(2, "已拒绝", "您提交的权限交接单 %s 已被 %s 拒绝。请重新交接。"), + REJECT(2, "已拒绝", "您提交的权限交接单 %s 已被 %s 拒绝。请重新交接。"), // 撤销 REVOKE(3, "撤销", "已撤销"); diff --git a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionHandoverApplicationService.kt b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionHandoverApplicationService.kt index b37c10d979e..56cdcd6eefd 100644 --- a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionHandoverApplicationService.kt +++ b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionHandoverApplicationService.kt @@ -128,7 +128,7 @@ class RbacPermissionHandoverApplicationService( titleOfApplication = titleOfApplication.plus(" $groupCount ").plus( bkHandoverGroups.plus(",").plus(" $authorizationCount ").plus(bkHandoverAuthorizations) ) - handoverOverviewContentOfEmail = """$groupCount$bkHandoverGroups,$authorizationCount$bkHandoverAuthorizations""".trimMargin() + handoverOverviewContentOfEmail = """ $groupCount $bkHandoverGroups, $authorizationCount $bkHandoverAuthorizations""".trimMargin() handoverOverviewContentOfRtx = handoverOverviewContentOfRtx.plus(groupCount).plus( bkHandoverGroups.plus(",").plus(authorizationCount).plus(bkHandoverAuthorizations) ) @@ -136,13 +136,13 @@ class RbacPermissionHandoverApplicationService( groupCount > 0 -> { titleOfApplication = titleOfApplication.plus(" $groupCount ").plus(bkHandoverGroups) - handoverOverviewContentOfEmail = """$groupCount$bkHandoverGroups""".trimMargin() + handoverOverviewContentOfEmail = """ $groupCount $bkHandoverGroups""".trimMargin() handoverOverviewContentOfRtx = handoverOverviewContentOfRtx.plus(groupCount).plus(bkHandoverGroups) } else -> { titleOfApplication = titleOfApplication.plus(" $authorizationCount ").plus(bkHandoverAuthorizations) - handoverOverviewContentOfEmail = """$authorizationCount$bkHandoverAuthorizations""".trimMargin() + handoverOverviewContentOfEmail = """ $authorizationCount $bkHandoverAuthorizations""".trimMargin() handoverOverviewContentOfRtx = handoverOverviewContentOfRtx.plus(authorizationCount).plus(bkHandoverAuthorizations) } } @@ -356,8 +356,7 @@ class RbacPermissionHandoverApplicationService( ).map { it.copy(approver = flowNo2Approver[it.flowNo]) } } - private val handoverApplicationUrl = - "${config.devopsHostGateway}/console/permission/my-handover?type=handoverToMe&flowNo=%s" + private val handoverApplicationUrl = "${config.devopsHostGateway}/console/permission/my-handover?type=handoverToMe&flowNo=%s" companion object { private val logger = LoggerFactory.getLogger(RbacPermissionHandoverApplicationService::class.java) diff --git a/support-files/i18n/notify/template_zh_CN.yaml b/support-files/i18n/notify/template_zh_CN.yaml index 5f811083f1d..15040ad2302 100644 --- a/support-files/i18n/notify/template_zh_CN.yaml +++ b/support-files/i18n/notify/template_zh_CN.yaml @@ -1021,7 +1021,7 @@ emailTemplate: id: "d57d7358f5034b21acafde62f27d75fd" title: "蓝盾权限交接申请" - body: "\n\n\n\n \n \n 蓝盾DevOps平台\n \n\n\n\n \n \n \n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n \n
\n
\n

蓝盾权限交接申请

\n
\n

您好,${handoverTo}:

\n

${handoverFrom} 已申请将蓝盾项目[${projectName}]下的 ${handoverOverviews} 移交给您,请确认是否接收。

\n
\n \n \n \n \n \n \n \n \n ${table}\n
交接类型资源类型数量
\n 马上处理\n
\n
\n
\n
\n\n\n\n" + body: "\n\n\n\n \n \n 蓝盾DevOps平台\n \n\n\n\n \n \n \n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n \n
\n
\n

蓝盾权限交接申请

\n
\n

你好,${handoverTo}:

\n

${handoverFrom} 已申请将蓝盾项目[${projectName}]下的 ${handoverOverviews}移交给你,请确认是否接收。

\n
\n \n \n \n \n \n \n \n \n ${table}\n
交接类型资源类型数量
\n 马上处理\n
\n
\n
\n
\n\n\n\n" sender: "DevOps" bodyFormat: 1 emailType: 1 @@ -1029,7 +1029,7 @@ id: "84f28ea9f6c44afaa3b7777cc286c18c" sender: "DevOps" title: "【蓝盾权限】移交通知" - body: "${handoverFrom}已申请将蓝盾项目【${projectName}】下的 ${handoverOverviewContentOfRtx}移交给您,请确认是否接收 \n去处理:${url}" + body: "${handoverFrom}申请将蓝盾项目【${projectName}】下的 ${handoverOverviewContentOfRtx}移交给你,请确认是否接收 \n去处理:${url}" creator: "system" modifior: "system" - index: 49 @@ -1044,7 +1044,7 @@ emailTemplate: id: "902b30b05d184f478ea8eaaea53533f1" title: "蓝盾权限交接申请" - body: "\n\n\n\n \n \n 蓝盾DevOps平台\n \n\n\n\n \n \n \n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n \n
\n
\n

蓝盾权限交接申请 - ${result}

\n
\n

您好,${handoverFrom}

\n

${content}

\n

审核意见:${remark}

\n
\n 查看更多\n
\n
\n
\n
\n\n\n\n\n " + body: "\n\n\n\n \n \n 蓝盾DevOps平台\n \n\n\n\n \n \n \n \n \n \n
\n \n \n \n \n \n \n
\n \n \n \n \n
\n
\n

蓝盾权限交接申请 - ${result}

\n
\n

你好,${handoverFrom}

\n

${content}

\n

审核意见:${remark}

\n
\n 查看详情\n
\n
\n
\n
\n\n\n\n\n " sender: "DevOps" bodyFormat: 1 emailType: 1 @@ -1052,6 +1052,6 @@ id: "4ead2e88f2a94fcbb7b1ffc5c523f742" sender: "DevOps" title: "蓝盾权限交接申请 - ${result}" - body: "您好,${handoverFrom} \n${content} \n审核意见:${remark} \n更多详情查看:${url}" + body: "你好,${handoverFrom} \n${content} \n审核意见:${remark} \n更多详情查看:${url}" creator: "system" modifior: "system"