Add :self_managed_welcome_onboarding feature flag and initial controller skeleton
What does this MR do and why?
Adds the initial scaffolding for the self-managed admin welcome flow behind the self_managed_welcome_flow feature flag. After sign-in, admins with no groups are redirected to /admin/registrations/groups/new - a stub page that will gain the create-group form in a follow-up MR.
For historical purposes - this is a vertically sliced iterative approach to the initial work in this MR that we have cut down for ease of review.
The service layer and view layer will be coming in MRs two and three.
Merge order: This is MR 1 of 3.
Related issue: 579942
Changes
- Redirect logic in SessionsController#after_sign_in_path_for - redirects root admins to the onboarding path on first-time login
- Admin::Registrations::GroupsController - new controller with new action only, gated by feature flag and admin check
- Feature flag
self_managed_welcome_onboarding(instance-scoped, group::acquisition) - Adds Route GET /admin/registrations/groups/new
MR acceptance checklist
This MR does not introduce a database migration Feature flag is defaulted to off Tests cover the redirect logic and the feature-flag gate
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
|
How to set up and validate locally
Enable the feature flag:
-
Feature.enable(:self_managed_welcome_onboarding) -
Set
export GITLAB_SIMULATE_SAAS=0and then rungdk reset-dataandgdk restartif needed -
Comment out
!Group.exists?inshould_redirect_to_sm_onboarding?(resource)or delete your groups prior to signing in (after trying both, just comment out the line - much easier) -
Sign in as the admin root user
-
Set new root password
-
Confirm you are redirected to
/admin/registrations/groups/new- page should be blank with a page title -
(Optional) Disable the flag and confirm the redirect no longer occurs
