From 9fc64e231dd3c04a9fa77afc5d012af730f0e8b2 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 15 Sep 2022 09:58:54 +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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/lib/controllers/organization/index.js b/api/app/lib/controllers/organization/index.js index 67c4b87..8f5e3d4 100644 --- a/api/app/lib/controllers/organization/index.js +++ b/api/app/lib/controllers/organization/index.js @@ -53,7 +53,7 @@ async function editUser (ctx) { ) { // 正在修改为管理员 storageData.disabled = true - storageData.role = [...[existUserRes.role], ...role] + storageData.role = [...new Set([...existUserRes.role, ...role])] } else if (existUserRes.role.includes('admin')) { // 正在修改成员 但是此时还是管理员 storageData.role = [...role, 'admin']