|
@@ -601,6 +601,10 @@ module.exports = app => {
|
|
|
const sqlParam = [this.tableName, account, encryptPassword, accountId, 'SSO password'];
|
|
|
const operate = await this.transaction.query(sql, sqlParam);
|
|
|
result = operate.affectedRows > 0;
|
|
|
+ // 判断账号是否为管理员,则同步更新到项目表里
|
|
|
+ if (accountData.is_admin) {
|
|
|
+ await this.transaction.update(this.ctx.service.project.tableName, { id: accountData.project_id, user_account: account });
|
|
|
+ }
|
|
|
} else {
|
|
|
const sql = 'UPDATE ?? SET password=? WHERE id=? AND password != ?;';
|
|
|
const sqlParam = [this.tableName, encryptPassword, accountId, 'SSO password'];
|