@Override
    public Boolean delete(Integer userId, String currentUser) {
        Preconditions.expectNotNull(userId, "User id should not be empty");
        // Whether the current user is an administrator
        UserEntity curUser = userMapper.selectByName(currentUser);
        UserEntity entity = userMapper.selectById(userId);
        Preconditions.expectTrue(curUser.getAccountType().equals(TenantUserTypeEnum.TENANT_ADMIN.getCode()),
                "Current user is not a manager and does not have permission to delete users");
        Preconditions.expectTrue(!Objects.equals(entity.getName(), currentUser),
                "Current user does not have permission to delete himself");
        String userName = entity.getName();
        removeInChargeForGroup(userName, currentUser);
        removeInChargeForCluster(userName, currentUser);
        removeInChargeForClusterTag(userName, currentUser);
        removeInChargeForDataNode(userName, currentUser);
        removeInChargeForConsume(userName, currentUser);
        userMapper.deleteById(userId);
        removeUserFromSession(userId, currentUser);
        LOGGER.debug("success to delete user by id={}, current user={}", userId, currentUser);
        return true;
    }
locked time, the unit is minute
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/user/UserServiceImpl.java