Skip to content

Commit

Permalink
Merge pull request #2940 from fitzcao/issus_2939
Browse files Browse the repository at this point in the history
refactor:auth错误码调整 #2939
  • Loading branch information
irwinsun authored Nov 9, 2020
2 parents 31f9197 + 1683364 commit ce53119
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" // 权限系统:父类资源必须为"项目"
}
13 changes: 7 additions & 6 deletions support-files/sql/5001_ci_project-init_dml_mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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"');

0 comments on commit ce53119

Please sign in to comment.