debian-mirror-gitlab/app/views/groups/settings/_two_factor_auth.html.haml
2021-11-18 22:05:49 +05:30

21 lines
1.3 KiB
Text

- return unless group.parent_allows_two_factor_authentication?
- docs_link_url = help_page_path('security/two_factor_authentication', 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,
_('Require all users in this group to set up two-factor authentication'),
checkbox_options: { data: { qa_selector: 'require_2fa_checkbox' } }
.form-group
= f.label :two_factor_grace_period, _('Time before enforced')
= f.text_field :two_factor_grace_period, class: 'form-control form-control-sm w-auto gl-form-input gl-mb-3'
.form-text.text-muted= _('Time (in hours) that users are allowed to skip forced configuration of two-factor authentication.')
- unless group.has_parent?
.form-group
= f.gitlab_ui_checkbox_component :allow_mfa_for_subgroups,
_('Allow subgroups to set up their own two-factor authentication rules'),
checkbox_options: { checked: group.namespace_settings&.allow_mfa_for_subgroups }