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']