message: Add (non-admin) users who create projects as owners of the created project
diff: @@ -200,6 +200,7 @@ const addProject = async (
  hasPermission,
  sqlClient,
  models,
  + keycloakGrant,
  },
  ) => {
  await hasPermission('project', 'add');
  @@ -356,6 +357,27 @@ const addProject = async (
  logger.error(`Could not link user to default projet group for ${project.name}: ${err.message}`);
  }
  + // Add the user who submitted this request to the project
  + let userAlreadyHasAccess;
  + try {
  + await hasPermission('project', 'viewAll');
  + userAlreadyHasAccess = true;
  + } catch(e) {
  + userAlreadyHasAccess = false;
  + }
  +
  + if (!userAlreadyHasAccess && keycloakGrant) {
  + const user = await models.UserModel.loadUserById(
  + keycloakGrant.access_token.content.sub,
  + );
  +
  + try {
  + await models.GroupModel.addUserToGroup(user, group, 'owner');
  + } catch (err) {
  + logger.error(`Could not link requesting user to default projet group for ${project.name}: ${err.message}`);
  + }
  + }
  +
  const harborOperations = createHarborOperations(sqlClient);
  const harborResults = await harborOperations.addProject(project.name, project.id)
  