2022-04-18 14:10:36 -04:00
= gitlab_ui_form_for @application_setting, url: reporting_admin_application_settings_path(anchor: 'js-spam-settings'), html: { class: 'fieldset-form' } do |f|
2022-08-18 17:12:09 -04:00
= form_errors(@application_setting)
2018-03-28 12:48:53 -04:00
%fieldset
2021-09-27 11:10:13 -04:00
%h5
= _('reCAPTCHA')
%p
= _('reCAPTCHA helps prevent credential stuffing.')
= link_to _('Only reCAPTCHA v2 is supported:'), 'https://developers.google.com/recaptcha/docs/versions', target: '_blank', rel: 'noopener noreferrer'
2018-06-13 03:40:55 -04:00
.form-group
2022-04-18 14:10:36 -04:00
- spam_help_link_url = help_page_path('integration/recaptcha.md')
- spam_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: spam_help_link_url }
= f.gitlab_ui_checkbox_component :recaptcha_enabled, _("Enable reCAPTCHA"),
help_text: _('Helps prevent bots from creating accounts. %{link_start}How do I configure it?%{link_end}').html_safe % { link_start: spam_help_link_start, link_end: '</a>'.html_safe }
2019-07-18 04:27:02 -04:00
.form-group
2022-04-18 14:10:36 -04:00
= f.gitlab_ui_checkbox_component :login_recaptcha_protection_enabled, _('Enable reCAPTCHA for login.'),
help_text: _('Helps prevent bots from brute-force attacks.')
2018-06-13 03:40:55 -04:00
.form-group
2021-09-27 11:10:13 -04:00
= f.label :recaptcha_site_key, _('reCAPTCHA site key'), class: 'label-bold'
2021-01-31 13:09:51 -05:00
= f.text_field :recaptcha_site_key, class: 'form-control gl-form-input'
2018-06-13 03:40:55 -04:00
.form-text.text-muted
2021-04-22 20:09:47 -04:00
= _("Generate site and private keys at")
2021-12-22 22:10:23 -05:00
%a{ href: 'http://www.google.com/recaptcha', target: 'blank', rel: 'noopener noreferrer' } http://www.google.com/recaptcha
2018-06-13 03:40:55 -04:00
.form-group
2021-09-27 11:10:13 -04:00
= f.label :recaptcha_private_key, _('reCAPTCHA private key'), class: 'label-bold'
2021-01-31 13:09:51 -05:00
= f.text_field :recaptcha_private_key, class: 'form-control gl-form-input'
2018-06-13 03:40:55 -04:00
2021-09-27 11:10:13 -04:00
%h5
= _('Invisible Captcha')
%p
= _('Invisible Captcha helps prevent the creation of spam accounts. It adds a honeypot field and time-sensitive form submission to the account signup form.')
= link_to _('Read their documentation.'), 'https://github.com/markets/invisible_captcha', target: '_blank', rel: 'noopener noreferrer'
2021-01-12 10:10:37 -05:00
.form-group
2022-04-18 14:10:36 -04:00
= f.gitlab_ui_checkbox_component :invisible_captcha_enabled, _('Enable Invisible Captcha during sign up'),
help_text: _('Helps prevent bots from creating accounts.')
2021-01-12 10:10:37 -05:00
2021-09-27 11:10:13 -04:00
%h5
= _('Akismet')
%p
= _('Akismet helps prevent the creation of spam issues in public projects.')
= link_to _('How do I configure Akismet?'), help_page_path('integration/akismet.md'), target: '_blank', rel: 'noopener noreferrer'
2018-06-13 03:40:55 -04:00
.form-group
2022-04-18 14:10:36 -04:00
= f.gitlab_ui_checkbox_component :akismet_enabled, _('Enable Akismet'),
help_text: _("Helps prevent bots from creating issues.")
2018-06-13 03:40:55 -04:00
.form-group
2021-04-22 20:09:47 -04:00
= f.label :akismet_api_key, _('Akismet API Key'), class: 'label-bold'
2021-01-31 13:09:51 -05:00
= f.text_field :akismet_api_key, class: 'form-control gl-form-input'
2018-06-13 03:40:55 -04:00
.form-text.text-muted
Generate API key at
2021-12-22 22:10:23 -05:00
%a{ href: 'http://www.akismet.com', target: 'blank', rel: 'noopener noreferrer' } http://www.akismet.com
2018-06-13 03:40:55 -04:00
2021-09-27 11:10:13 -04:00
%h5
= _('IP address restrictions')
2018-06-13 03:40:55 -04:00
.form-group
2022-04-18 14:10:36 -04:00
= f.gitlab_ui_checkbox_component :unique_ips_limit_enabled, _("Limit sign in from multiple IP addresses"),
help_text: _("Helps prevent malicious users hide their activity.")
2018-06-13 03:40:55 -04:00
.form-group
2021-09-27 11:10:13 -04:00
= f.label :unique_ips_limit_per_user, _('IP addresses per user'), class: 'label-bold'
2021-01-31 13:09:51 -05:00
= f.number_field :unique_ips_limit_per_user, class: 'form-control gl-form-input'
2018-06-13 03:40:55 -04:00
.form-text.text-muted
2021-09-27 11:10:13 -04:00
= _("Maximum number of unique IP addresses per user.")
2018-06-13 03:40:55 -04:00
.form-group
2021-09-27 11:10:13 -04:00
= f.label :unique_ips_limit_time_window, _('IP address expiration time'), class: 'label-bold'
2021-01-31 13:09:51 -05:00
= f.number_field :unique_ips_limit_time_window, class: 'form-control gl-form-input'
2018-06-13 03:40:55 -04:00
.form-text.text-muted
2021-09-27 11:10:13 -04:00
= _("How many seconds an IP counts toward the IP address limit.")
%h5
= _('Spam Check')
2018-03-28 12:48:53 -04:00
2020-05-22 05:08:09 -04:00
.form-group
2022-04-18 14:10:36 -04:00
= f.gitlab_ui_checkbox_component :spam_check_endpoint_enabled, _('Enable Spam Check via external API endpoint'),
help_text: _('Define custom rules for what constitutes spam, independent of Akismet')
2020-05-22 05:08:09 -04:00
.form-group
= f.label :spam_check_endpoint_url, _('URL of the external Spam Check endpoint'), class: 'label-bold'
2021-01-31 13:09:51 -05:00
= f.text_field :spam_check_endpoint_url, class: 'form-control gl-form-input'
2021-04-30 14:10:09 -04:00
.form-group
2021-09-27 11:10:13 -04:00
= f.label :spam_check_api_key, _('Spam Check API key'), class: 'gl-font-weight-bold'
2021-04-30 14:10:09 -04:00
= f.text_field :spam_check_api_key, class: 'form-control gl-form-input'
2021-09-27 11:10:13 -04:00
.form-text.text-muted= _('The API key used by GitLab for accessing the Spam Check service endpoint.')
2020-05-22 05:08:09 -04:00
2021-04-22 20:09:47 -04:00
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"