Skip to content

Remove duplicate authorized_projects entries during refresh

Imre Farkas requested to merge if-218744-remove_duplicate_project_auths into master

What does this MR do?

Adds a check to Users::RefreshAuthorizedProjectsService#execute_without_lease to remove project_authorizations if multiple ones exists for the same project_id for the user. Previously, these project_authorizations were left in the DB and were never cleaned up.

See: https://gitlab.com/gitlab-org/gitlab/-/issues/218744

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Imre Farkas

Merge request reports

Loading