Remove association between ChatName and Integration - Step 2: code changes

This issue is part of the epic &9418 (closed). See that epic for more details.

About

We want to remove the association between a ChatName and an Integration in order to be able to identify users in Slack without a project or integration.

In a previous issue #384963 (closed), made the association between ChatName and Integration optional in database modelling.

In this next step, we will modify the code to stop associating ChatName and Integration records, and finally, we will drop the database chat_names.integration_id column later in #384974 (closed).

Proposal

  • Change ChatNames::AuthorizeUserService to not take an integration. This will mean the #chat_name_params in that class will have no integration_id.
  • Change Gitlab::ChatNameToken#get to not retrieve integration_id.

With those changes, Profiles::ChatNamesController should continue to work.

AppSec audit

The merge request(s) should be approved by AppSec.

Edited by Luke Duncalfe