无法删除当前登录用户
This commit is contained in:
parent
80a50999a7
commit
5a703e080e
|
@ -131,6 +131,10 @@ public class UserService {
|
|||
}
|
||||
|
||||
public void deleteUser(String userId) {
|
||||
SessionUser user = SessionUtils.getUser();
|
||||
if (StringUtils.equals(user.getId(), userId)) {
|
||||
MSException.throwException(Translator.get("cannot_delete_current_user"));
|
||||
}
|
||||
userMapper.deleteByPrimaryKey(userId);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,4 +32,5 @@ workspace_not_exists=Workspace is not exists
|
|||
#api
|
||||
api_load_script_error=Load script error
|
||||
user_id_already_exists=User ID already exists
|
||||
password_modification_failed=Password modification failed
|
||||
password_modification_failed=Password modification failed
|
||||
cannot_delete_current_user=Cannot delete the user currently logged in
|
|
@ -32,4 +32,5 @@ workspace_not_exists=工作空间不存在
|
|||
#api
|
||||
api_load_script_error=读取脚本失败
|
||||
user_id_already_exists=用户id已存在
|
||||
password_modification_failed=密码修改失败
|
||||
password_modification_failed=密码修改失败
|
||||
cannot_delete_current_user=无法删除当前登录用户
|
Loading…
Reference in New Issue