From 16833647dce8bb56c4c1bbb6de50af4141e9071e Mon Sep 17 00:00:00 2001 From: cao150260 Date: Mon, 9 Nov 2020 21:22:59 +0800 Subject: [PATCH] =?UTF-8?q?refactor:auth=E9=94=99=E8=AF=AF=E7=A0=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4=20#2939?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../devops/auth/constant/AuthMessageCode.kt | 17 +++++++---------- .../sql/5001_ci_project-init_dml_mysql.sql | 13 +++++++------ 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/constant/AuthMessageCode.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/constant/AuthMessageCode.kt index db121f4542f..dd15b6f1f23 100644 --- a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/constant/AuthMessageCode.kt +++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/constant/AuthMessageCode.kt @@ -17,14 +17,11 @@ package com.tencent.devops.auth.constant * */ object AuthMessageCode { - const val GROUP_EXIST = "2122001" // 权限系统: 用户组已存在 - const val GROUP_NOT_EXIST = "2122002" // 权限系统: 用户组不存在 - const val GROUP_NOT_BIND_PERSSION = "2122003" // 权限系统:自定义用户组未绑定权限 - const val GROUP_USER_ALREADY_EXIST = "2122004" // 权限系统:用户已在该用户组 - const val GROUP_ACTION_EMPTY = "2122005" // 权限系统:用户组未绑定动作 - - const val TOKEN_TICKET_FAIL = "2122106" // 权限系统:token校验失败 - const val PARENT_TYPE_FAIL = "2122107" // 权限系统:父类资源必须为"项目" - const val KEYWORD_TOO_SHORT = "2122108" // 权限系统:搜索关键词长度必须大于2 - const val TOO_MANY_INFOS = "2122109" // 权限系统:搜索结果过多,请提供精准关键词 + const val GROUP_EXIST = "2121001" // 权限系统: 用户组已存在 + const val GROUP_NOT_EXIST = "2121002" // 权限系统: 用户组不存在 + const val GROUP_NOT_BIND_PERSSION = "2121003" // 权限系统:自定义用户组未绑定权限 + const val GROUP_USER_ALREADY_EXIST = "2121004" // 权限系统:用户已在该用户组 + const val GROUP_ACTION_EMPTY = "2121005" // 权限系统:用户组未绑定动作 + const val TOKEN_TICKET_FAIL = "2121106" // 权限系统:token校验失败 + const val PARENT_TYPE_FAIL = "2121107" // 权限系统:父类资源必须为"项目" } \ No newline at end of file diff --git a/support-files/sql/5001_ci_project-init_dml_mysql.sql b/support-files/sql/5001_ci_project-init_dml_mysql.sql index 1f8f1a47225..3edee571bae 100755 --- a/support-files/sql/5001_ci_project-init_dml_mysql.sql +++ b/support-files/sql/5001_ci_project-init_dml_mysql.sql @@ -421,10 +421,11 @@ REPLACE INTO `T_MESSAGE_CODE_DETAIL` (`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MES REPLACE INTO `T_MESSAGE_CODE_DETAIL` (`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_EN`) VALUES ('86b89de5c8c04642bf9e0c479fff5bcd', '2101060', '01', 'Model内包含项目未安装插件[{0}]', 'project not install atom in model'); REPLACE INTO `T_MESSAGE_CODE_DETAIL` (`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_EN`) VALUES ('0237dd5742004eef992c15ce0f78c172', '2101061', '01', 'Model内包含不存在的内置插件', 'unDefault and uninstall atom in model'); REPLACE INTO `T_MESSAGE_CODE_DETAIL` (`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_EN`) VALUES ('8995059509cd46a0a61e7db3abd4f98b', '2101191', '01', '异常:流水线的基础构建数据Summary不存在,请联系管理员', 'System Error: build_summary not found, Please contract Admin!'); -REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('bba91f6256244970b7655b997b7f01c2', '2122001', '22', '权限系统: 用户组已存在', '', 'auth: group exist'); -REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('901f3f3eb29c434fb312518551861340', '2122002', '22', '权限系统: 用户组不存在', '', 'auth: group not exist'); -REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('c6a6e0d69600491ca0c7ef0efa195e01', '2122003', '22', '权限系统:自定义用户组未绑定权限', '', 'auth: group not bind auth'); -REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('81fbf26597d84a8a9ac7fa0b0b943077', '2122004', '22', '权限系统:用户已在该用户组', '', 'auth: user in same group'); -REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('b1fd4717bf7d445faf474c0e2b339d68', '2122005', '22', '权限系统:用户组未绑定动作', '', 'auth: group not bind action'); -REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('02e0fa6c49ba40ea9a7c97d91aa8cb11', '2122006', '22', '权限系统:token校验失败', '', 'auth: token check fail'); +REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('bba91f6256244970b7655b997b7f01c2', '2121001', '21', '权限系统: 用户组已存在', '', 'auth: group exist'); +REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('901f3f3eb29c434fb312518551861340', '2121002', '21', '权限系统: 用户组不存在', '', 'auth: group not exist'); +REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('c6a6e0d69600491ca0c7ef0efa195e01', '2121003', '21', '权限系统:自定义用户组未绑定权限', '', 'auth: group not bind auth'); +REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('81fbf26597d84a8a9ac7fa0b0b943077', '2121004', '21', '权限系统:用户已在该用户组', '', 'auth: user in same group'); +REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('b1fd4717bf7d445faf474c0e2b339d68', '2121005', '21', '权限系统:用户组未绑定动作', '', 'auth: group not bind action'); +REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('02e0fa6c49ba40ea9a7c97d91aa8cb11', '2121006', '21', '权限系统:token校验失败', '', 'auth: token check fail'); +REPLACE INTO `T_MESSAGE_CODE_DETAIL`(`ID`, `MESSAGE_CODE`, `MODULE_CODE`, `MESSAGE_DETAIL_ZH_CN`, `MESSAGE_DETAIL_ZH_TW`, `MESSAGE_DETAIL_EN`) VALUES ('61f5425a3ac94c63bd5509417d9fc425', '2121007', '21', '权限系统:父类资源必须为"项目"', '', 'auth: the parent resource must be "project"');