Commit 8e2c38c1 authored by Kerri Miller's avatar Kerri Miller

Merge branch 'al-enable-admin-new-user-signups-cap-flag-by-default' into 'master'

Enable admin_new_user_signups_cap flag by default

See merge request gitlab-org/gitlab!49761
parents 0ca2860b 877d8b20
...@@ -57,7 +57,7 @@ module EE ...@@ -57,7 +57,7 @@ module EE
attrs << :maintenance_mode_message attrs << :maintenance_mode_message
end end
attrs << :new_user_signups_cap if ::Feature.enabled?(:admin_new_user_signups_cap) attrs << :new_user_signups_cap if ::Feature.enabled?(:admin_new_user_signups_cap, default_enabled: true )
attrs attrs
end end
......
...@@ -91,7 +91,7 @@ module EE ...@@ -91,7 +91,7 @@ module EE
end end
def show_new_user_signups_cap_reached? def show_new_user_signups_cap_reached?
return false unless ::Feature.enabled?(:admin_new_user_signups_cap) return false unless ::Feature.enabled?(:admin_new_user_signups_cap, default_enabled: true )
return false unless current_user&.admin? return false unless current_user&.admin?
return false if user_dismissed?(NEW_USER_SIGNUPS_CAP_REACHED) return false if user_dismissed?(NEW_USER_SIGNUPS_CAP_REACHED)
......
...@@ -349,7 +349,7 @@ module EE ...@@ -349,7 +349,7 @@ module EE
end end
def should_apply_user_signup_cap? def should_apply_user_signup_cap?
::Feature.enabled?(:admin_new_user_signups_cap) && ::Feature.enabled?(:admin_new_user_signups_cap, default_enabled: true ) &&
::Gitlab::CurrentSettings.new_user_signups_cap.present? ::Gitlab::CurrentSettings.new_user_signups_cap.present?
end end
......
...@@ -48,7 +48,7 @@ module EE ...@@ -48,7 +48,7 @@ module EE
def user_cap_increased? def user_cap_increased?
return false unless application_setting.previous_changes.key?(:new_user_signups_cap) return false unless application_setting.previous_changes.key?(:new_user_signups_cap)
return false unless ::Feature.enabled?(:admin_new_user_signups_cap) return false unless ::Feature.enabled?(:admin_new_user_signups_cap, default_enabled: true )
previous_user_cap, current_user_cap = application_setting.previous_changes[:new_user_signups_cap] previous_user_cap, current_user_cap = application_setting.previous_changes[:new_user_signups_cap]
......
- return unless ::Feature.enabled?(:admin_new_user_signups_cap) - return unless ::Feature.enabled?(:admin_new_user_signups_cap, default_enabled: true )
.form-group .form-group
= form.label :new_user_signups_cap, s_('AdminArea|User cap'), class: 'label-bold' = form.label :new_user_signups_cap, s_('AdminArea|User cap'), class: 'label-bold'
......
---
title: Introduce User Cap admin setting
merge_request: 49761
author:
type: added
--- ---
name: admin_new_user_signups_cap name: admin_new_user_signups_cap
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45643 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45643
rollout_issue_url: rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/292600
milestone: '13.6' milestone: '13.6'
type: development type: development
group: group::purchase group: group::purchase
default_enabled: false default_enabled: true
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment