Commit 07bba906 authored by manojmj's avatar manojmj

Remove `admin_approval_for_new_user_signups` feature check

This change remove
`admin_approval_for_new_user_signups` feature check while
permitting attributes in the controller/API
parent a7eac516
......@@ -167,7 +167,7 @@ module ApplicationSettingsHelper
end
def visible_attributes
attributes = [
[
:abuse_notification_email,
:after_sign_out_path,
:after_sign_up_text,
......@@ -265,6 +265,7 @@ module ApplicationSettingsHelper
:receive_max_input_size,
:repository_checks_enabled,
:repository_storages_weighted,
:require_admin_approval_after_user_signup,
:require_two_factor_authentication,
:restricted_visibility_levels,
:rsa_key_restriction,
......@@ -331,9 +332,6 @@ module ApplicationSettingsHelper
:wiki_page_max_content_bytes,
:container_registry_delete_tags_service_timeout
]
attributes << :require_admin_approval_after_user_signup if Feature.enabled?(:admin_approval_for_new_user_signups)
attributes
end
def external_authorization_service_attributes
......
......@@ -87,37 +87,12 @@ RSpec.describe Admin::ApplicationSettingsController do
sign_in(admin)
end
context 'require_admin_approval_after_user_signup setting' do
subject do
put :update, params: { application_setting: { require_admin_approval_after_user_signup: true } }
end
context 'when feature is enabled' do
before do
stub_feature_flags(admin_approval_for_new_user_signups: true)
end
it 'updates the require_admin_approval_after_user_signup setting' do
subject
put :update, params: { application_setting: { require_admin_approval_after_user_signup: true } }
expect(response).to redirect_to(general_admin_application_settings_path)
expect(ApplicationSetting.current.require_admin_approval_after_user_signup).to eq(true)
end
end
context 'when feature is disabled' do
before do
stub_feature_flags(admin_approval_for_new_user_signups: false)
end
it 'does not update the require_admin_approval_after_user_signup setting' do
subject
expect(response).to redirect_to(general_admin_application_settings_path)
expect(ApplicationSetting.current.require_admin_approval_after_user_signup).not_to eq(true)
end
end
end
it 'updates the password_authentication_enabled_for_git setting' do
put :update, params: { application_setting: { password_authentication_enabled_for_git: "0" } }
......
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