FE [Group owner bypass] Integrate form with backend
What does this MR do and why?
- Adds the expiry date component that pairs with the bypass confirmation checkbox.
- When the 'Reassign placeholders to enterprise users' checkbox is rendered but disabled, the expiry date picker will not show.
- When the checkbox is unchecked, the date picker shows but is disabled, so that the user cannot save a date without turning on a setting.
- When the checkbox is checked, a minimum expiry of 25 hours is set, unless the user selects one themselves.
- Tests the full flow
- Updates docs
- Adds premium badge
Feature background
The previous frontend MR added a checkbox to the group settings page. When checked, it means that during the process of migrating groups enterprise users do not receive email confirmations about the placeholder reassignment process.
The epic -> &17871
How is it determined what the user sees?
Not every group owner will see the bypass setting in groups/<GROUP-NAME>/-/edit#js-permissions-settings. This is largely determined by the following three conditions
- feature flag -
group_owner_placeholder_confirmation_bypass
- domain verification check as defined in ee/app/models/ee/namespace.rb
- Free tier, OR Enterprise tier (premium & ultimate)
- is Dotcom AND is a top-level group
def domain_verification_available?
::Gitlab.com? && root? && licensed_feature_available?(:domain_verification)
end
References
Summary of feature #546425 (closed)
Screenshots or screen recordings
State | Why | Screenshot |
---|---|---|
No UI markers (setting not shown) |
|
No 'Placeholder user reassignment confirmation' setting is shown. |
Checkbox shown but disabled. No datepicker shown. Premium badge next to heading |
|
|
Checkbox shown and is toggleable. Datepicker shown Premium badge next to heading |
|
Video
How to set up and validate locally
Base state
- Load the app with the normal
gdk start
and select one of your top level groups. - Navigate to the group settings page at /groups/<groupname>/-/edit#js-permissions-settings Or by selecting the Settings navlink in the sidebar
- Under the section Permissions and group features you should not see the setting 'Placeholder user reassignment confirmation' setting anywhere in the section
Setting shown but disabled
-
Make sure your instance is premium or ultimate
-
In rails console
Feature.enable(:group_owner_placeholder_confirmation_bypass)
-
In your code editor, open the file ee/app/models/ee/namespace.rb and replace the contents of this function with false
## simulates that group is NOT enterprise, although you're running gdk as SaaS & choosing a root group def domain_verification_available? false end
-
Restart gdk and simulate dotcom by running
GITLAB_SIMULATE_SAAS=1 gdk restart
-
Reload the settings for your group. You should see the Placeholder user confirmation setting with the checkbox disabled.
-
You should not see an expiry date picker
Setting shown and changeable
- Undo the change you made to namespace.rb. Keep the FF enabled and your instance needs to be premium or ultimate
- Restart with
GITLAB_SIMULATE_SAAS=1 gdk restart
- Reload the settings for your group. You should see the Placeholder user confirmation setting with the checkbox toggle-able and the datepicker
- When you check the checkbox an expiry date is automatically set. Click save
- When the page reloads, try to clear the date and save the skip setting without a date. You should see an error
- Try to set a date 2 years from now (backend validation -- not handled in this MR)
- Try unchecking the checkbox and save.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #546425 (closed)