Loading
Hide restricted access configuration on contract overages allowed false
What does this MR do and why?
We want to hide the restricted access configuration for Self-Managed and GitLab.com, in case the attribute contract_overages_allowed is set to false
References
Screenshots or screen recordings
| Deployment Type | URL | Before | After |
|---|---|---|---|
| GitLab.com | http://gdk.test:8080/groups/15026/-/edit#js-permissions-settings | ![]() |
|
| Self-Managed | http://gdk.test:8080/admin/application_settings/general#js-signup-settings | ![]() |
How to set up and validate locally
Apply the following patch to ensure the custom attribute is set. This will become controllable once this merge request here is merged.
Patch
diff --git a/ee/app/helpers/ee/application_settings_helper.rb b/ee/app/helpers/ee/application_settings_helper.rb
index 963ac6f65f0a..dc93f282ceb7 100644
--- a/ee/app/helpers/ee/application_settings_helper.rb
+++ b/ee/app/helpers/ee/application_settings_helper.rb
@@ -262,7 +262,7 @@ def signup_form_data
seat_control = License.feature_available?(:seat_control) ? @application_setting[:seat_control] : ''
form_data[:seat_control] = seat_control.to_s
- form_data[:contract_overages_allowed] = License.current ? License.current.contract_overages_allowed.to_s : 'true'
+ form_data[:contract_overages_allowed] = 'false'
form_data[:ldap_sync_configured] = bso_provisioning_warning?(::Gitlab::Auth::Ldap::Config).to_s
form_data[:saml_scim_configured] = bso_provisioning_warning?(::Gitlab::Auth::Saml::Config).to_s
diff --git a/ee/app/views/groups/_seat_control_setting.html.haml b/ee/app/views/groups/_seat_control_setting.html.haml
index 11e33bba7ed4..52d868216a01 100644
--- a/ee/app/views/groups/_seat_control_setting.html.haml
+++ b/ee/app/views/groups/_seat_control_setting.html.haml
@@ -3,7 +3,7 @@
.form-group#js-seat-control
%h5
= _("Seat control")
- - if group.gitlab_subscription&.contract_overages_allowed? == false
+ - if true
.gl-flex.gl-items-start.gl-gap-3
= sprite_icon('lock', css_class: 'gl-mt-1 gl-flex-shrink-0 gl-text-gray-500')
%p.gl-mb-0GitLab.com
- Start your GitLab instance in SaaS mode
export GITLAB_SIMULATE_SAAS=1; gdk restart - Get a subscription for a top-level group
- Check that http://gdk.test:8080/groups/15026/-/edit#js-permissions-settings hides the Restricted Access controls
Self-Managed
- Start your GitLab instance in Self-Managed mode
export GITLAB_SIMULATE_SAAS=0; gdk restart - Get and enable a license for your instance
- Check that http://gdk.test:8080/admin/application_settings/general#js-signup-settings hides the controls
Edited by Lukas Wanko

