1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
= gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-signin-settings'), html: { class: 'fieldset-form', id: 'signin-settings' } do |f|
= form_errors(@application_setting)
%fieldset
.form-group
= f.gitlab_ui_checkbox_component :password_authentication_enabled_for_web,
_('Allow password authentication for the web interface'),
help_text: _('Clear this checkbox to use an external authentication provider instead.')
.form-group
= f.gitlab_ui_checkbox_component :password_authentication_enabled_for_git,
_('Allow password authentication for Git over HTTP(S)'),
help_text: Gitlab::Auth::Ldap::Config.enabled? ? _('Clear this checkbox to use a personal access token or LDAP password instead.') : _('Clear this checkbox to use a personal access token instead.')
- if omniauth_enabled? && button_based_providers.any?
.form-group
= f.gitlab_ui_checkbox_component :disable_password_authentication_for_users_with_sso_identities,
_('Disable password authentication for users with an SSO identity'),
help_text: _('Ensure users with SSO identities cannot sign in with password even when password authentication is enabled.')
%fieldset.form-group
%legend.gl-text-base.gl-mb-3.gl-border-none.gl-font-bold= _('Enabled OAuth authentication sources')
= hidden_field_tag 'application_setting[enabled_oauth_sign_in_sources][]'
- oauth_providers_checkboxes(f).each do |source|
= source
.form-group
= f.label :two_factor_authentication, _('Two-factor authentication'), class: 'label-bold'
- help_text = _('Enforce two-factor authentication for all user sign-ins.')
- help_link = link_to _('Learn more.'), help_page_path('security/two_factor_authentication.md'), target: '_blank', rel: 'noopener noreferrer'
= f.gitlab_ui_checkbox_component :require_two_factor_authentication,
_('Enforce two-factor authentication'),
help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
.form-group
= f.label :require_admin_two_factor_authentication, _('Enforce Two-Factor authentication for administrator users'), class: 'label-bold'
= f.gitlab_ui_checkbox_component :require_admin_two_factor_authentication, _('Require administrators to enable 2FA')
.form-group
= f.label :two_factor_authentication, _('Two-factor grace period'), class: 'label-bold'
= f.number_field :two_factor_grace_period, min: 0, class: 'form-control gl-form-input', placeholder: '0'
.form-text.gl-text-subtle
= _('Maximum time that users are allowed to skip the setup of two-factor authentication (in hours). Set to 0 (zero) to enforce at next sign in.')
.form-group
= f.label :admin_mode, _('Admin Mode'), class: 'label-bold'
- help_text = _('Require additional authentication for administrative tasks.')
- help_link = link_to _('Learn more.'), help_page_path('administration/settings/sign_in_restrictions.md', anchor: 'admin-mode'), target: '_blank', rel: 'noopener noreferrer'
= f.gitlab_ui_checkbox_component :admin_mode,
_('Enable Admin Mode'),
help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
.form-group
= f.label :unknown_sign_in, _('Email notification for unknown sign-ins'), class: 'label-bold'
- help_text = _('Notify users by email when sign-in location is not recognized.')
- help_link = link_to _('Learn more.'), help_page_path('user/profile/notifications.md', anchor: 'notifications-for-unknown-sign-ins'), target: '_blank', rel: 'noopener noreferrer'
= f.gitlab_ui_checkbox_component :notify_on_unknown_sign_in,
_('Enable email notification'),
help_text: '%{help_text} %{help_link}'.html_safe % { help_text: help_text, help_link: help_link }
.form-group
= f.label :home_page_url, _('Home page URL'), class: 'label-bold'
= f.text_field :home_page_url, class: 'form-control gl-form-input', placeholder: 'http://company.example.com', :'aria-describedby' => 'home_help_block'
%span.form-text.gl-text-subtle#home_help_block= _("Direct non-authenticated users to this page.")
.form-group
= f.label :after_sign_out_path, _('Sign-out page URL'), class: 'label-bold'
= f.text_field :after_sign_out_path, class: 'form-control gl-form-input', placeholder: 'http://company.example.com', :'aria-describedby' => 'after_sign_out_path_help_block'
%span.form-text.gl-text-subtle#home_help_block= _("Direct users to this page after they sign out.")
= f.submit _('Save changes'), pajamas_button: true
|