Skip to content

Always pass namespace_id when using OAuth in importers

Illya Klymov requested to merge xanf-oauth-provider-namespace-id into master

What does this MR do and why?

Related to Importers - Default to the current group when i... (#359130 - closed)

This MR correctly reuses namespace_id through import process of all importers using OAuth. This allows us to correctly select current group as default for import.

We are doing this by adding namespace_id to callback url and passing it again from callback url to status. OAuth specs allow us to pass arbitrary number of query params to callback url, so there will not be problem with any OAuth provider

Screenshots or screen recordings

Flightjs___GitLab__1_

How to set up and validate locally

  1. Set-up oauth for github, gitlab and bitbucket
  2. Visit any group (except the one you saw on previous step)
  3. New project -> Import -> GitLab.com
  4. Observe that group selected as default import
  5. (repeat previous 2 steps for bitbucket cloud importer and github importer)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related issue:

Describe in detail what your merge request does and why.

Screenshots or screen recordings

Edited by Illya Klymov

Merge request reports

Loading