debian-mirror-gitlab/app/views/admin/application_settings/_signup.html.haml

81 lines
5.7 KiB
Text
Raw Normal View History

2019-12-04 20:38:33 +05:30
= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-signup-settings'), html: { class: 'fieldset-form' } do |f|
2018-05-09 12:01:36 +05:30
= form_errors(@application_setting)
%fieldset
.form-group
2018-11-08 19:23:39 +05:30
.form-check
2021-03-08 18:12:59 +05:30
= f.check_box :signup_enabled, class: 'form-check-input', data: { qa_selector: 'signup_enabled_checkbox' }
2018-11-08 19:23:39 +05:30
= f.label :signup_enabled, class: 'form-check-label' do
Sign-up enabled
2020-03-13 15:44:24 +05:30
.form-text.text-muted
= _("When enabled, any user visiting %{host} will be able to create an account.") % { host: "#{new_user_session_url(host: Gitlab.config.gitlab.host)}" }
2021-01-29 00:20:46 +05:30
.form-group
.form-check
2021-02-22 17:27:13 +05:30
= f.check_box :require_admin_approval_after_user_signup, class: 'form-check-input', data: { qa_selector: 'require_admin_approval_after_user_signup_checkbox' }
2021-01-29 00:20:46 +05:30
= f.label :require_admin_approval_after_user_signup, class: 'form-check-label' do
= _('Require admin approval for new sign-ups')
.form-text.text-muted
= _("When enabled, any user visiting %{host} and creating an account will have to be explicitly approved by an admin before they can sign in. This setting is effective only if sign-ups are enabled.") % { host: "#{new_user_session_url(host: Gitlab.config.gitlab.host)}" }
2018-05-09 12:01:36 +05:30
.form-group
2018-11-08 19:23:39 +05:30
.form-check
= f.check_box :send_user_confirmation_email, class: 'form-check-input'
= f.label :send_user_confirmation_email, class: 'form-check-label' do
Send confirmation email on sign-up
2021-01-29 00:20:46 +05:30
= render_if_exists 'admin/application_settings/new_user_signups_cap', form: f
2020-01-01 13:55:28 +05:30
.form-group
= f.label :minimum_password_length, _('Minimum password length (number of characters)'), class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.number_field :minimum_password_length, class: 'form-control gl-form-input', rows: 4, min: ApplicationSetting::DEFAULT_MINIMUM_PASSWORD_LENGTH, max: Devise.password_length.max
2020-01-01 13:55:28 +05:30
- password_policy_guidelines_link = link_to _('Password Policy Guidelines'), 'https://about.gitlab.com/handbook/security/#gitlab-password-policy-guidelines', target: '_blank', rel: 'noopener noreferrer nofollow'
.form-text.text-muted
= _("See GitLab's %{password_policy_guidelines}").html_safe % { password_policy_guidelines: password_policy_guidelines_link }
2018-05-09 12:01:36 +05:30
.form-group
2021-01-29 00:20:46 +05:30
= f.label :domain_allowlist, _('Allowed domains for sign-ups'), class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.text_area :domain_allowlist_raw, placeholder: 'domain.com', class: 'form-control gl-form-input', rows: 8
2018-11-08 19:23:39 +05:30
.form-text.text-muted ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com
2018-05-09 12:01:36 +05:30
.form-group
2021-01-29 00:20:46 +05:30
= f.label :domain_denylist_enabled, _('Domain denylist'), class: 'label-bold'
2018-11-08 19:23:39 +05:30
.form-check
2021-01-29 00:20:46 +05:30
= f.check_box :domain_denylist_enabled, class: 'form-check-input'
= f.label :domain_denylist_enabled, class: 'form-check-label' do
Enable domain denylist for sign ups
2018-05-09 12:01:36 +05:30
.form-group
2018-11-08 19:23:39 +05:30
.form-check
2021-01-29 00:20:46 +05:30
= radio_button_tag :denylist_type, :file, false, class: 'form-check-input'
= label_tag :denylist_type_file, class: 'form-check-label' do
2018-11-08 19:23:39 +05:30
.option-title
2021-01-29 00:20:46 +05:30
Upload denylist file
2018-11-08 19:23:39 +05:30
.form-check
2021-01-29 00:20:46 +05:30
= radio_button_tag :denylist_type, :raw, @application_setting.domain_denylist.present? || @application_setting.domain_denylist.blank?, class: 'form-check-input'
= label_tag :denylist_type_raw, class: 'form-check-label' do
2018-11-08 19:23:39 +05:30
.option-title
2021-01-29 00:20:46 +05:30
Enter denylist manually
.form-group.js-denylist-file
= f.label :domain_denylist_file, _('Denylist file'), class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.file_field :domain_denylist_file, class: 'form-control gl-form-input', accept: '.txt,.conf'
2018-11-08 19:23:39 +05:30
.form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines or commas for multiple entries.
2021-01-29 00:20:46 +05:30
.form-group.js-denylist-raw
= f.label :domain_denylist, _('Denied domains for sign-ups'), class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.text_area :domain_denylist_raw, placeholder: 'domain.com', class: 'form-control gl-form-input', rows: 8
2018-11-08 19:23:39 +05:30
.form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com
2020-05-24 23:13:21 +05:30
.form-group
= f.label :email_restrictions_enabled, _('Email restrictions'), class: 'label-bold'
.form-check
= f.check_box :email_restrictions_enabled, class: 'form-check-input'
= f.label :email_restrictions_enabled, class: 'form-check-label' do
= _('Enable email restrictions for sign ups')
.form-group
= f.label :email_restrictions, _('Email restrictions for sign-ups'), class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.text_area :email_restrictions, class: 'form-control gl-form-input', rows: 4
2020-05-24 23:13:21 +05:30
.form-text.text-muted
- supported_syntax_link_url = 'https://github.com/google/re2/wiki/Syntax'
- supported_syntax_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: supported_syntax_link_url }
= _('Restricts sign-ups for email addresses that match the given regex. See the %{supported_syntax_link_start}supported syntax%{supported_syntax_link_end} for more information.').html_safe % { supported_syntax_link_start: supported_syntax_link_start, supported_syntax_link_end: '</a>'.html_safe }
2018-05-09 12:01:36 +05:30
.form-group
2018-11-18 11:00:15 +05:30
= f.label :after_sign_up_text, class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.text_area :after_sign_up_text, class: 'form-control gl-form-input', rows: 4
2018-11-08 19:23:39 +05:30
.form-text.text-muted Markdown enabled
2021-04-17 20:07:23 +05:30
= f.submit 'Save changes', class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' }