From c4c392ea156c5b3a259c572e6aaf8210f69a91ec Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 15 Sep 2022 09:34:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/organization/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/lib/controllers/organization/index.js b/api/app/lib/controllers/organization/index.js index c50985d..358843c 100644 --- a/api/app/lib/controllers/organization/index.js +++ b/api/app/lib/controllers/organization/index.js @@ -48,11 +48,11 @@ async function editUser (ctx) { // 存在且传递id 或者 不传id也存在 // 修改 update storageData.deleted = false - storageData.role = [...new Set([...existUserRes.role, ...role])] + storageData.role = role if ( storageData.role.includes('admin') ) { - storageData.disabled = false + storageData.disabled = true } await models.User.update(storageData, { where: {