diff --git a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message.properties b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message.properties index 741d4248f3..d4bbd64e11 100644 --- a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message.properties +++ b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message.properties @@ -35,8 +35,8 @@ 0=成功 ##系统错误-权限 -1238001=用户权限不足 -9900403=用户权限不足 +1238001=用户{0}权限不足 +9900403=用户{0}权限不足 1238002=用户无业务操作权限 ##系统错误-API通用 diff --git a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_en.properties b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_en.properties index 17a83048ce..ba11c625ab 100644 --- a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_en.properties +++ b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_en.properties @@ -35,8 +35,8 @@ 0=Success ## System error - permissions -1238001=Insufficient user permissions -9900403=Insufficient user permissions +1238001=Insufficient user {0} permissions +9900403=Insufficient user {0} permissions 1238002=Insufficient user permissions for application ## System error - API common diff --git a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_en_US.properties b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_en_US.properties index 17a83048ce..ba11c625ab 100644 --- a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_en_US.properties +++ b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_en_US.properties @@ -35,8 +35,8 @@ 0=Success ## System error - permissions -1238001=Insufficient user permissions -9900403=Insufficient user permissions +1238001=Insufficient user {0} permissions +9900403=Insufficient user {0} permissions 1238002=Insufficient user permissions for application ## System error - API common diff --git a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_zh.properties b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_zh.properties index 741d4248f3..d4bbd64e11 100644 --- a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_zh.properties +++ b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_zh.properties @@ -35,8 +35,8 @@ 0=成功 ##系统错误-权限 -1238001=用户权限不足 -9900403=用户权限不足 +1238001=用户{0}权限不足 +9900403=用户{0}权限不足 1238002=用户无业务操作权限 ##系统错误-API通用 diff --git a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_zh_CN.properties b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_zh_CN.properties index 741d4248f3..d4bbd64e11 100644 --- a/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_zh_CN.properties +++ b/src/backend/commons/common-i18n/src/main/resources/i18n/exception/message_zh_CN.properties @@ -35,8 +35,8 @@ 0=成功 ##系统错误-权限 -1238001=用户权限不足 -9900403=用户权限不足 +1238001=用户{0}权限不足 +9900403=用户{0}权限不足 1238002=用户无业务操作权限 ##系统错误-API通用 diff --git a/src/backend/commons/common/src/main/java/com/tencent/bk/job/common/model/Response.java b/src/backend/commons/common/src/main/java/com/tencent/bk/job/common/model/Response.java index 3eebdf4d06..b0af4a4935 100644 --- a/src/backend/commons/common/src/main/java/com/tencent/bk/job/common/model/Response.java +++ b/src/backend/commons/common/src/main/java/com/tencent/bk/job/common/model/Response.java @@ -93,7 +93,8 @@ public static Response buildSuccessResp(T data) { } public static Response buildAuthFailResp(AuthResultVO authResult) { - Response resp = new Response<>(ErrorCode.PERMISSION_DENIED, null); + Response resp = new Response<>(ErrorCode.PERMISSION_DENIED, + new String[]{JobContextUtil.getUsername()}, null); resp.authResult = authResult; return resp; } diff --git a/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/EsbResp.java b/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/EsbResp.java index 59a7213a32..fac31e68ed 100644 --- a/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/EsbResp.java +++ b/src/backend/commons/esb-sdk/src/main/java/com/tencent/bk/job/common/esb/model/EsbResp.java @@ -101,7 +101,8 @@ public static EsbResp buildCommonFailResp(ServiceException e) { } public static EsbResp buildAuthFailResult(EsbApplyPermissionDTO permission) { - EsbResp esbResp = buildCommonFailResp(ErrorCode.BK_PERMISSION_DENIED, null, null); + EsbResp esbResp = buildCommonFailResp(ErrorCode.BK_PERMISSION_DENIED, + new String[]{JobContextUtil.getUsername()}, null); esbResp.setPermission(permission); return esbResp; } diff --git a/src/backend/gradle.properties b/src/backend/gradle.properties index 2e9367317e..5b32487eb9 100644 --- a/src/backend/gradle.properties +++ b/src/backend/gradle.properties @@ -29,6 +29,6 @@ MAVEN_REPO_URL= MAVEN_REPO_DEPLOY_URL= MAVEN_REPO_USERNAME= MAVEN_REPO_PASSWORD= -DB_HOST= -DB_USERNAME= -DB_PASSWORD= +DB_HOST=127.0.0.1 +DB_USERNAME=root +DB_PASSWORD=root