Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_visibility_and_access.html.haml « application_settings « admin « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 624f5a48c3ab0e95f443ce047770666f8ba30681 (plain)
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-visibility-settings'), html: { class: 'fieldset-form', id: 'visibility-settings' } do |f|
  = form_errors(@application_setting)

  %fieldset
    = render 'shared/project_creation_levels', f: f, method: :default_project_creation, legend: s_('ProjectCreationLevel|Default project creation protection')
    = render_if_exists 'admin/application_settings/default_project_deletion_protection_setting', form: f
    = render_if_exists 'admin/application_settings/deletion_protection_settings', form: f
    .form-group.visibility-level-setting
      = f.label :default_project_visibility, class: 'label-bold'
      = render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: Project.new)
    .form-group.visibility-level-setting
      = f.label :default_snippet_visibility, class: 'label-bold'
      = render('shared/visibility_radios', model_method: :default_snippet_visibility, form: f, selected_level: @application_setting.default_snippet_visibility, form_model: ProjectSnippet.new)
    .form-group.visibility-level-setting
      = f.label :default_group_visibility, class: 'label-bold'
      = render('shared/visibility_radios', model_method: :default_group_visibility, form: f, selected_level: @application_setting.default_group_visibility, form_model: Group.new)
    %fieldset.form-group.gl-form-group{ data: { testid: 'restricted-visibility-levels' } }
      %legend.col-form-label
        = s_('AdminSettings|Restricted visibility levels')
        %small.form-text.text-gl-muted
          = s_('AdminSettings|Prevent non-administrators from using the selected visibility levels for groups, projects and snippets.')
          = s_('AdminSettings|The selected level must be different from the selected default group and project visibility.')
          = link_to _('Learn more.'), help_page_path('administration/settings/visibility_and_access_controls', anchor: 'restrict-visibility-levels'), target: '_blank', rel: 'noopener noreferrer'
      = hidden_field_tag 'application_setting[restricted_visibility_levels][]'
      .gl-form-checkbox-group
        - restricted_level_checkboxes(f).each do |checkbox|
          = checkbox

    = render_if_exists 'admin/application_settings/ldap_access_setting', form: f

    = render_if_exists 'admin/application_settings/saml_group_locks_setting', form: f

    .form-group
      %label.label-bold= _('Enabled Git access protocols')
      = 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
        = _('Allow only the selected protocols to be used for Git access.')

    .form-group
      = f.label :custom_http_clone_url_root, _('Custom Git clone URL for HTTP(S)'), class: 'label-bold'
      = 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'
      %span.form-text.text-muted#custom_http_clone_url_root_help_block
        = _('Replaces the clone URL root.')

    - Gitlab::SSHPublicKey.supported_types.each do |type|
      - field_name = :"#{type}_key_restriction"
      .form-group
        = f.label field_name, "#{type.upcase} SSH keys", class: 'label-bold'
        = f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control'

    .form-group
      %label.label-bold= s_('AdminSettings|Feed token')
      = f.gitlab_ui_checkbox_component :disable_feed_token, s_('AdminSettings|Disable feed token')

    = render_if_exists 'admin/application_settings/globally_allowed_ips', form: f

    -# This is added for Jihu edition in https://jihulab.com/gitlab-cn/gitlab/-/merge_requests/1112
    = render_if_exists 'admin/application_settings/disable_download_button', f: f

  = f.submit _('Save changes'), pajamas_button: true