diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /lib/api/settings.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'lib/api/settings.rb')
-rw-r--r-- | lib/api/settings.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/api/settings.rb b/lib/api/settings.rb index aac195f0668..36f816ae638 100644 --- a/lib/api/settings.rb +++ b/lib/api/settings.rb @@ -176,6 +176,7 @@ module API optional :require_admin_approval_after_user_signup, type: Boolean, desc: 'Require explicit admin approval for new signups' optional :whats_new_variant, type: String, values: ApplicationSetting.whats_new_variants.keys, desc: "What's new variant, possible values: `all_tiers`, `current_tier`, and `disabled`." optional :floc_enabled, type: Grape::API::Boolean, desc: 'Enable FloC (Federated Learning of Cohorts)' + optional :user_deactivation_emails_enabled, type: Boolean, desc: 'Send emails to users upon account deactivation' ApplicationSetting::SUPPORTED_KEY_TYPES.each do |type| optional :"#{type}_key_restriction", @@ -225,6 +226,16 @@ module API attrs[:asset_proxy_allowlist] = attrs.delete(:asset_proxy_whitelist) end + # Also accept these attributes under their new names. + # + # TODO: Once we rename the columns, we have to swap this around and keep supporting the old names until v5. + # https://gitlab.com/gitlab-org/gitlab/-/issues/340031 + %w[enabled period_in_seconds requests_per_period].each do |suffix| + old_name = :"throttle_unauthenticated_#{suffix}" + new_name = :"throttle_unauthenticated_web_#{suffix}" + attrs[old_name] = attrs.delete(new_name) if attrs.has_key?(new_name) + end + # since 13.0 it's not possible to disable hashed storage - support can be removed in 14.0 attrs.delete(:hashed_storage_enabled) if attrs.has_key?(:hashed_storage_enabled) |