async _mDelete(type, request) {
    const ids = request.getBodyArray("ids");
    const refresh = request.getRefresh("wait_for");

    if (ids.length > global.kuzzle.config.limits.documentsWriteCount) {
      throw kerror.get("services", "storage", "write_limit_exceeded");
    }

    const successes = [];
    const errors = [];

    await Bluebird.map(ids, (id) =>
      this.ask(`core:security:${type}:delete`, id, { refresh })
        .then(() => successes.push(id))
        .catch((err) => errors.push(err)),
    );

    if (errors.length) {
      request.setError(
        kerror.get("services", "storage", "incomplete_delete", errors),
      );
    }

    if (successes.length > 1000) {
      global.kuzzle.log.info(
        `[SECURITY] ${SecurityController.userOrSdk(
          request.getKuid(),
        )} deleted the following ${type}s: ${successes
          .slice(0, 1000)
          .join(", ")}... (${successes.length - 1000} more users deleted)."`,
      );
    } else {
      global.kuzzle.log.info(
        `[SECURITY] ${SecurityController.userOrSdk(
          request.getKuid(),
        )} deleted the following ${type}s: ${successes.join(", ")}."`,
      );
    }

    return successes;
  }
@param {string.<profile|role|user>} type
@param {Request} request
@returns {Promise.<Array.<string>>}
@private