bug fix 禁用用户后仍可登录
This commit is contained in:
parent
ab23a3d5f3
commit
eeb6dd0a70
|
@ -69,6 +69,11 @@ public class UserController {
|
|||
userService.updateUserRole(user);
|
||||
}
|
||||
|
||||
@PostMapping("/special/update_status")
|
||||
public void updateStatus(@RequestBody User user) {
|
||||
userService.updateUser(user);
|
||||
}
|
||||
|
||||
@PostMapping("/special/ws/member/list/{goPage}/{pageSize}")
|
||||
@RequiresRoles(RoleConstants.ADMIN)
|
||||
public Pager<List<User>> getMemberListByAdmin(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryMemberRequest request) {
|
||||
|
|
|
@ -241,8 +241,6 @@ public class UserService {
|
|||
userRoleExample.createCriteria().andUserIdEqualTo(userId).andSourceIdEqualTo(request.getWorkspaceId());
|
||||
List<UserRole> userRoles = userRoleMapper.selectByExample(userRoleExample);
|
||||
if (userRoles.size() > 0) {
|
||||
User user = userMapper.selectByPrimaryKey(userId);
|
||||
String username = user.getName();
|
||||
MSException.throwException(Translator.get("user_already_exists"));
|
||||
} else {
|
||||
for (String roleId : request.getRoleIds()) {
|
||||
|
@ -274,8 +272,6 @@ public class UserService {
|
|||
userRoleExample.createCriteria().andUserIdEqualTo(userId).andSourceIdEqualTo(request.getOrganizationId());
|
||||
List<UserRole> userRoles = userRoleMapper.selectByExample(userRoleExample);
|
||||
if (userRoles.size() > 0) {
|
||||
User user = userMapper.selectByPrimaryKey(userId);
|
||||
String username = user.getName();
|
||||
MSException.throwException(Translator.get("user_already_exists"));
|
||||
} else {
|
||||
for (String roleId : request.getRoleIds()) {
|
||||
|
|
|
@ -489,7 +489,7 @@
|
|||
this.btnAddRole = false;
|
||||
},
|
||||
changeSwitch(row) {
|
||||
this.$post(this.updatePath, row, () => {
|
||||
this.$post('/user/special/update_status', row, () => {
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue