debian-mirror-gitlab/app/views/admin/application_settings/_visibility_and_access.html.haml

78 lines
4.8 KiB
Text
Raw Normal View History

2021-04-29 21:17:54 +05:30
= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form', id: 'visibility-settings' } do |f|
2018-05-09 12:01:36 +05:30
= form_errors(@application_setting)
%fieldset
2020-04-08 14:13:33 +05:30
= render 'shared/default_branch_protection', f: f, selected_level: @application_setting.default_branch_protection
2020-05-24 23:13:21 +05:30
= render_if_exists 'admin/application_settings/group_owners_can_manage_default_branch_protection_setting', form: f
2020-04-08 14:13:33 +05:30
2019-07-07 11:18:12 +05:30
.form-group
= f.label s_('ProjectCreationLevel|Default project creation protection'), class: 'label-bold'
= f.select :default_project_creation, options_for_select(Gitlab::Access.project_creation_options, @application_setting.default_project_creation), {}, class: 'form-control'
2019-09-04 21:01:54 +05:30
= render_if_exists 'admin/application_settings/default_project_deletion_protection_setting', form: f
2020-01-01 13:55:28 +05:30
= render_if_exists 'admin/application_settings/default_project_deletion_adjourned_period_setting', form: f
2018-05-09 12:01:36 +05:30
.form-group.visibility-level-setting
2018-11-18 11:00:15 +05:30
= f.label :default_project_visibility, class: 'label-bold'
2018-11-08 19:23:39 +05:30
= render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: Project.new)
2018-05-09 12:01:36 +05:30
.form-group.visibility-level-setting
2018-11-18 11:00:15 +05:30
= f.label :default_snippet_visibility, class: 'label-bold'
2018-11-08 19:23:39 +05:30
= render('shared/visibility_radios', model_method: :default_snippet_visibility, form: f, selected_level: @application_setting.default_snippet_visibility, form_model: ProjectSnippet.new)
2018-05-09 12:01:36 +05:30
.form-group.visibility-level-setting
2018-11-18 11:00:15 +05:30
= f.label :default_group_visibility, class: 'label-bold'
2018-11-08 19:23:39 +05:30
= render('shared/visibility_radios', model_method: :default_group_visibility, form: f, selected_level: @application_setting.default_group_visibility, form_model: Group.new)
2018-05-09 12:01:36 +05:30
.form-group
2018-11-18 11:00:15 +05:30
= f.label :restricted_visibility_levels, class: 'label-bold'
2018-11-08 19:23:39 +05:30
- checkbox_name = 'application_setting[restricted_visibility_levels][]'
= hidden_field_tag(checkbox_name)
- restricted_level_checkboxes('restricted-visibility-help', checkbox_name, class: 'form-check-input').each do |level|
.form-check
= level
%span.form-text.text-muted#restricted-visibility-help
2019-07-07 11:18:12 +05:30
= _('Selected levels cannot be used by non-admin users for groups, projects or snippets. If the public level is restricted, user profiles are only visible to logged in users.')
2018-05-09 12:01:36 +05:30
.form-group
2018-11-18 11:00:15 +05:30
= f.label :import_sources, class: 'label-bold'
2018-11-08 19:23:39 +05:30
= hidden_field_tag 'application_setting[import_sources][]'
- import_sources_checkboxes('import-sources-help', class: 'form-check-input').each do |source|
.form-check= source
%span.form-text.text-muted#import-sources-help
2019-07-07 11:18:12 +05:30
= _('Enabled sources for code import during project creation. OmniAuth must be configured for GitHub')
2021-03-11 19:13:27 +05:30
= link_to sprite_icon('question-o'), help_page_path("integration/github")
2018-11-08 19:23:39 +05:30
, Bitbucket
2021-03-11 19:13:27 +05:30
= link_to sprite_icon('question-o'), help_page_path("integration/bitbucket")
2018-11-08 19:23:39 +05:30
and GitLab.com
2021-03-11 19:13:27 +05:30
= link_to sprite_icon('question-o'), help_page_path("integration/gitlab")
2018-05-09 12:01:36 +05:30
2019-07-07 11:18:12 +05:30
= render_if_exists 'admin/application_settings/ldap_access_setting', form: f
2018-05-09 12:01:36 +05:30
.form-group
2018-11-08 19:23:39 +05:30
.form-check
= f.check_box :project_export_enabled, class: 'form-check-input'
= f.label :project_export_enabled, class: 'form-check-label' do
2019-07-07 11:18:12 +05:30
= _('Project export enabled')
2018-05-09 12:01:36 +05:30
.form-group
2019-07-07 11:18:12 +05:30
%label.label-bold= _('Enabled Git access protocols')
2018-11-08 19:23:39 +05:30
= select(:application_setting, :enabled_git_access_protocol, [['Both SSH and HTTP(S)', nil], ['Only SSH', 'ssh'], ['Only HTTP(S)', 'http']], {}, class: 'form-control')
%span.form-text.text-muted#clone-protocol-help
2019-07-07 11:18:12 +05:30
= _('Allow only the selected protocols to be used for Git access.')
2020-01-01 13:55:28 +05:30
2019-12-21 20:55:43 +05:30
.form-group
= f.label :custom_http_clone_url_root, _('Custom Git clone URL for HTTP(S)'), class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.text_field :custom_http_clone_url_root, class: 'form-control gl-form-input', placeholder: 'https://git.example.com', :'aria-describedby' => 'custom_http_clone_url_root_help_block'
2019-12-21 20:55:43 +05:30
%span.form-text.text-muted#custom_http_clone_url_root_help_block
= _('Replaces the clone URL root.')
2018-05-09 12:01:36 +05:30
- ApplicationSetting::SUPPORTED_KEY_TYPES.each do |type|
- field_name = :"#{type}_key_restriction"
.form-group
2018-11-18 11:00:15 +05:30
= f.label field_name, "#{type.upcase} SSH keys", class: 'label-bold'
2018-11-08 19:23:39 +05:30
= f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control'
2021-02-22 17:27:13 +05:30
.form-group
%label.label-bold= s_('AdminSettings|Feed token')
.form-check
= f.check_box :disable_feed_token, class: 'form-check-input'
= f.label :disable_feed_token, class: 'form-check-label' do
= s_('AdminSettings|Disable feed token')
2021-04-17 20:07:23 +05:30
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"