File: _two_factor_auth.html.haml

package info (click to toggle)
gitlab 17.6.5-19
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 629,368 kB
  • sloc: ruby: 1,915,304; javascript: 557,307; sql: 60,639; xml: 6,509; sh: 4,567; makefile: 1,239; python: 406
file content (21 lines) | stat: -rw-r--r-- 1,323 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
- return unless group.parent_allows_two_factor_authentication?
- docs_link_url = help_page_path('security/two_factor_authentication.md', anchor: 'enforce-2fa-for-all-users-in-a-group')
- docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: docs_link_url }

%h5= _('Two-factor authentication')

%p= s_('%{docs_link_start}What is two-factor authentication?%{docs_link_end}').html_safe % { docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe }

.form-group
  = f.gitlab_ui_checkbox_component :require_two_factor_authentication,
      _('All users in this group must set up two-factor authentication'),
      checkbox_options: { data: { testid: 'require-2fa-checkbox' } }
.form-group
  = f.label :two_factor_grace_period, _('Delay 2FA enforcement (hours)')
  = f.text_field :two_factor_grace_period, class: 'form-control form-control-sm w-auto gl-form-input gl-mb-3'
  .form-text.gl-text-subtle= _("The maximum amount of time users have to set up two-factor authentication before it's enforced.")
- unless group.has_parent?
  .form-group
    = f.gitlab_ui_checkbox_component :allow_mfa_for_subgroups,
        _('Subgroups can set up their own two-factor authentication rules'),
        checkbox_options: { checked: group.namespace_settings&.allow_mfa_for_subgroups }