async function listConnections(req, res) {
  const { models } = req;
  let [connections, access] = await Promise.all([
    models.connections.findAll(),
    models.connectionAccesses.findAllActiveByUserId(req.user.id),
  ]);

  connections = connections.map((connection) => removePassword(connection));

  // Admins have access to all connections.
  if (req.user.role !== 'admin') {
    // map access to a set of connection ids
    access = new Set(access.map((e) => e.connectionId));
    // If all connections are allowed by this magic id, we can show all and don't need to filter the list.
    if (!access.has(consts.EVERY_CONNECTION_ID)) {
      // if not all are allowed then we filter each connection and check that it is in the access list.
      connections = connections.filter((e) => access.has(e.id));
    }
  }
  return res.utils.data(connections);
}
Lists only connections that are available to the user.
TODO MAJOR BREAKING - for next major version, remove all connection data other than name, driver, dates created

@param {Req} req
@param {Res} res