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..d7e0279648 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..adb00386dd 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=User ({0}) permission not allowed, please confirm and apply in IAM and try again +9900403=User ({0}) permission not allowed, please confirm and apply in IAM and try again 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..adb00386dd 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=User ({0}) permission not allowed, please confirm and apply in IAM and try again +9900403=User ({0}) permission not allowed, please confirm and apply in IAM and try again 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..d7e0279648 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..d7e0279648 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/constant/ErrorCode.java b/src/backend/commons/common/src/main/java/com/tencent/bk/job/common/constant/ErrorCode.java index a0559b4179..39370ba5bd 100644 --- a/src/backend/commons/common/src/main/java/com/tencent/bk/job/common/constant/ErrorCode.java +++ b/src/backend/commons/common/src/main/java/com/tencent/bk/job/common/constant/ErrorCode.java @@ -320,9 +320,9 @@ public class ErrorCode { // ==================================== 系统级错误 ================================================// // ======== 系统错误-权限错误 ==================// - // 用户权限不足 + // 用户({0})权限不足,请前往权限中心确认并申请补充后重试 public static final int PERMISSION_DENIED = 1238001; - // 蓝鲸统一权限错误码 + // 蓝鲸统一权限错误码,用户({0})权限不足,请前往权限中心确认并申请补充后重试 public static final int BK_PERMISSION_DENIED = 9900403; // ========= 系统错误-请求 ====================// 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..fae8eed059 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..4893070877 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; }