From 580d7a999843adc4654203cf6477109b98089ef9 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 15 Sep 2022 19:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8=E6=88=90=E5=91=98=E7=A6=81?= =?UTF-8?q?=E6=AD=A2=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/.vscode/launch.json | 1 + api/app/lib/controllers/auth/index.js | 2 +- api/app/lib/controllers/organization/index.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index 8903b20..7bac2dd 100644 --- a/api/.vscode/launch.json +++ b/api/.vscode/launch.json @@ -29,6 +29,7 @@ // "--qndmn http://resources.anxinyun.cn", "--qndmn http://rhvqdivo5.hn-bkt.clouddn.com", "--clickHouseUrl http://10.8.30.71", + // "--clickHouseUrl https://clickhouse01.anxinyun.cn/play", "--clickHousePort 30123", "--clickHouseAnxincloud anxinyun", "--clickHousePepEmis pepca", diff --git a/api/app/lib/controllers/auth/index.js b/api/app/lib/controllers/auth/index.js index d038b79..bd67e02 100644 --- a/api/app/lib/controllers/auth/index.js +++ b/api/app/lib/controllers/auth/index.js @@ -29,7 +29,7 @@ async function login (ctx, next) { if (!pomsRegisterRes) { throw '你还不是飞尚运维中台成员,请联系管理员添加权限' } else if ( - pomsRegisterRes.disable && (!pomsRegisterRes.role || !pomsRegisterRes.role.includes('admin')) + pomsRegisterRes.disabled && !pomsRegisterRes.role.includes('admin') ) { throw '当前账号已禁用' } diff --git a/api/app/lib/controllers/organization/index.js b/api/app/lib/controllers/organization/index.js index e832813..87c22c2 100644 --- a/api/app/lib/controllers/organization/index.js +++ b/api/app/lib/controllers/organization/index.js @@ -29,14 +29,14 @@ async function allDeps (ctx) { async function editUser (ctx) { try { const models = ctx.fs.dc.models; - const { pepUserId, role = [], correlationProject = [] } = ctx.request.body + const { pomsUserId, pepUserId, role = [], correlationProject = [] } = ctx.request.body const existUserRes = await models.User.findOne({ where: { pepUserId } }) - if (existUserRes && !existUserRes.deleted && !pepUserId) { + if (existUserRes && !existUserRes.deleted && !pomsUserId) { // 新增已存在未删除 throw '人员账号已添加' }