2021-01-03 14:25:43 +05:30
|
|
|
- return unless group.parent_allows_two_factor_authentication?
|
2018-12-13 13:39:08 +05:30
|
|
|
- docs_link_url = help_page_path('security/two_factor_authentication', anchor: 'enforcing-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_('Check the %{docs_link_start}documentation%{docs_link_end}.').html_safe % { docs_link_start: docs_link_start, docs_link_end: '</a>'.html_safe }
|
|
|
|
|
|
|
|
.form-group
|
2021-06-08 01:23:25 +05:30
|
|
|
.gl-form-checkbox.custom-control.custom-checkbox
|
|
|
|
= f.check_box :require_two_factor_authentication, class: 'custom-control-input', data: { qa_selector: 'require_2fa_checkbox' }
|
|
|
|
= f.label :require_two_factor_authentication, class: 'custom-control-label' do
|
|
|
|
= _('Require all users in this group to setup two-factor authentication')
|
2018-12-13 13:39:08 +05:30
|
|
|
.form-group
|
|
|
|
= f.label :two_factor_grace_period, _('Time before enforced'), class: 'label-bold'
|
|
|
|
= f.text_field :two_factor_grace_period, class: 'form-control form-control-sm w-auto'
|
|
|
|
.form-text.text-muted= _('Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication')
|
2021-01-03 14:25:43 +05:30
|
|
|
- unless group.has_parent?
|
|
|
|
.form-group
|
2021-06-08 01:23:25 +05:30
|
|
|
.gl-form-checkbox.custom-control.custom-checkbox
|
|
|
|
= f.check_box :allow_mfa_for_subgroups, class: 'custom-control-input', checked: group.namespace_settings&.allow_mfa_for_subgroups
|
|
|
|
= f.label :allow_mfa_for_subgroups, class: 'custom-control-label' do
|
2021-01-03 14:25:43 +05:30
|
|
|
= _('Allow subgroups to set up their own two-factor authentication rules')
|