diff options
author | Robert Speicher <robert@gitlab.com> | 2017-09-01 19:23:08 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-09-01 19:23:08 +0000 |
commit | 223849fa173b7059e717ba4f9c02075a452cbd49 (patch) | |
tree | 19dd9e840010234164a4461ac081889c07e05c9a /app/views/admin | |
parent | dd825c0f5d00cef3cac89480bcf2027064c5d89d (diff) | |
parent | 29b40db58944a32db6cf1ae9906653a2e5f4be9d (diff) | |
download | gitlab-ce-223849fa173b7059e717ba4f9c02075a452cbd49.tar.gz |
Merge branch '17849-allow-admin-to-restrict-min-key-length-and-techno' into 'master'
Add settings for minimum key strength and allowed key type
Closes #17849
See merge request !13712
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/application_settings/_form.html.haml | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index 54dfc9695d7..b38433326fc 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -42,12 +42,7 @@ = link_to "(?)", help_page_path("integration/bitbucket") and GitLab.com = link_to "(?)", help_page_path("integration/gitlab") - .form-group - %label.control-label.col-sm-2 Enabled Git access protocols - .col-sm-10 - = select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control') - %span.help-block#clone-protocol-help - Allow only the selected protocols to be used for Git access. + .form-group .col-sm-offset-2.col-sm-10 .checkbox @@ -55,6 +50,20 @@ = f.check_box :project_export_enabled Project export enabled + .form-group + %label.control-label.col-sm-2 Enabled Git access protocols + .col-sm-10 + = select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control') + %span.help-block#clone-protocol-help + Allow only the selected protocols to be used for Git access. + + - ApplicationSetting::SUPPORTED_KEY_TYPES.each do |type| + - field_name = :"#{type}_key_restriction" + .form-group + = f.label field_name, "#{type.upcase} SSH keys", class: 'control-label col-sm-2' + .col-sm-10 + = f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control' + %fieldset %legend Account and Limit Settings .form-group |