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: {