|
|
|
@ -395,6 +395,17 @@ public class UsersServiceImpl extends BaseServiceImpl implements UsersService {
|
|
|
|
|
putMsg(result, Status.USER_NOT_EXIST, userId); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// non-admin should not modify tenantId and queue
|
|
|
|
|
if (!isAdmin(loginUser)) { |
|
|
|
|
if (tenantId != null && user.getTenantId() != tenantId) { |
|
|
|
|
throw new ServiceException(Status.USER_NO_OPERATION_PERM); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotEmpty(queue) && !StringUtils.equals(queue, user.getQueue())) { |
|
|
|
|
throw new ServiceException(Status.USER_NO_OPERATION_PERM); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotEmpty(userName)) { |
|
|
|
|
|
|
|
|
|
if (!CheckUtils.checkUserName(userName)) { |
|
|
|
|