message: cleanup and moving around some code
  Adding it back to helpers.js so we can refactor all at once
diff: @@ -20,6 +20,14 @@ const Helpers = (sqlClient /* : MariaSQL */) => {
  return R.prop(0, rows);
  };
  + const getProjectByName = async (name /* : string */) => {
  + const rows = await query(sqlClient, Sql.selectProjectByName(name));
  + return R.prop(0, rows);
  + };
  +
  + const getProjectsByIds = (projectIds /* : Array<number> */) =>
  + query(sqlClient, Sql.selectProjectsByIds(projectIds));
  +
  const getProjectsWithoutDirectUserAccess = async (
  projectIds /* : Array<string> */,
  userIds /* : Array<number> */,
  @@ -31,6 +39,8 @@ const Helpers = (sqlClient /* : MariaSQL */) => {
  return {
  getProjectById,
  + getProjectByName,
  + getProjectsByIds,
  getProjectsWithoutDirectUserAccess,
  getProjectIdByName: async (name /* : string */) => {
  const pidResult = await query(sqlClient, Sql.selectProjectIdByName(name));
  @@ -101,69 +111,6 @@ const Helpers = (sqlClient /* : MariaSQL */) => {
  R.prop('name'),
  await query(sqlClient, Sql.selectAllProjectNames()),
  ),
  - // mapIfNoDirectProjectAccess: async (
  - // projectId /* : string */,
  - // customerId /* : number */,
  - // callback /* : ({keycloakUserId: string, keycloakUsername: string, keycloakGroupId: string, keycloakGroupName: string}) => Promise<void> */,
  - // ) => {
  - // // Get the users given access to the customer
  - // const users = await userHelpers(sqlClient).getUsersByCustomerId(
  - // customerId,
  - // );
  -
  - // // Remove all users from the Keycloak groups that correspond to all projects
  - // for (const user of users) {
  - // // Return the project in an array if the user id does not have other access via `project_user`.
  - // const projectName = R.path(
  - // [0, 'name'],
  - // await getProjectsWithoutDirectUserAccess(
  - // [projectId],
  - // [R.prop('id', user)],
  - // ),
  - // );
  -
  - // const email = R.prop('email', user);
  - // const keycloakUserId = await userHelpers(
  - // sqlClient,
  - // ).getKeycloakUserIdByUsername(email);
  -
  - // const keycloakGroupId = await KeycloakOperations.findGroupIdByName(
  - // projectName,
  - // );
  -
  - // await callback({
  - // keycloakUserId,
  - // keycloakUsername: email,
  - // keycloakGroupId,
  - // keycloakGroupName: projectName,
  - // });
  - // }
  - // },
  - // Given a lagoon project, add all users (direct and indirect) that have access to the projects
  - // corresponding keycloak group.
  - // addProjectUsersToKeycloakGroup: async (project /* : Object */) => {
  - // const users = await query(
  - // sqlClient,
  - // Sql.selectAllUsersForProjectId(project.id),
  - // );
  -
  - // const keycloakGroupId = await KeycloakOperations.findGroupIdByName(
  - // project.name,
  - // );
  -
  - // for (const user of users) {
  - // const email = R.prop('email', user);
  - // const keycloakUserId = await userHelpers(
  - // sqlClient,
  - // ).getKeycloakUserIdByUsername(email);
  -
  - // await keycloakAdminClient.users.addToGroup({
  - // id: keycloakUserId,
  - // groupId: keycloakGroupId,
  - // });
  - // logger.debug(`Added Keycloak user ${email} to group "${project.name}"`);
  - // }
  - // },
  };
  };
  