mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-12 17:42:49 +00:00
修复用户更新状态,角色丢失
This commit is contained in:
parent
f48144d7c5
commit
17435158a0
@ -104,6 +104,9 @@ export class BaseSysUserService extends BaseService {
|
|||||||
* @param user
|
* @param user
|
||||||
*/
|
*/
|
||||||
async updateUserRole(user) {
|
async updateUserRole(user) {
|
||||||
|
if (_.isEmpty(user.roleIdList)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (user.username === 'admin') {
|
if (user.username === 'admin') {
|
||||||
throw new CoolCommException('非法操作~');
|
throw new CoolCommException('非法操作~');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user