2021-07-22 12:10:04 +00:00
= gitlab_ui_form_for @group, html: { multipart: true, class: 'gl-show-field-errors js-general-permissions-form' }, authenticity_token: true do |f|
2018-08-08 06:24:36 +00:00
%input{ type: 'hidden', name: 'update_section', value: 'js-permissions-settings' }
2018-05-28 12:58:39 +00:00
= form_errors(@group)
%fieldset
2018-10-15 13:36:19 +00:00
%h5= _('Permissions')
2021-06-15 00:10:11 +00:00
- if @group.root?
.form-group.gl-mb-3
2021-07-22 12:10:04 +00:00
= f.gitlab_ui_checkbox_component :prevent_sharing_groups_outside_hierarchy,
2021-09-30 21:11:33 +00:00
s_('GroupSettings|Prevent members from sending invitations to groups outside of %{group} and its subgroups').html_safe % { group: link_to_group(@group) },
2021-07-22 12:10:04 +00:00
help_text: prevent_sharing_groups_outside_hierarchy_help_text(@group),
checkbox_options: { disabled: !can_change_prevent_sharing_groups_outside_hierarchy?(@group) }
2021-06-15 00:10:11 +00:00
2020-06-22 15:09:27 +00:00
.form-group.gl-mb-3
2021-08-02 18:08:48 +00:00
= f.gitlab_ui_checkbox_component :share_with_group_lock,
s_('GroupSettings|Prevent sharing a project within %{group} with other groups').html_safe % { group: link_to_group(@group) },
checkbox_options: { disabled: !can_change_share_with_group_lock?(@group) },
help_text: share_with_group_lock_help_text(@group)
2018-05-28 12:58:39 +00:00
2020-06-22 15:09:27 +00:00
.form-group.gl-mb-3
2021-08-02 18:08:48 +00:00
= f.gitlab_ui_checkbox_component :emails_disabled,
s_('GroupSettings|Disable email notifications'),
checkbox_options: { checked: @group.emails_disabled?, disabled: !can_disable_group_emails?(@group) },
2021-09-30 21:11:33 +00:00
help_text: s_('GroupSettings|Overrides user notification preferences for all members of the group, subgroups, and projects.')
2019-08-17 05:56:48 +00:00
2020-06-22 15:09:27 +00:00
.form-group.gl-mb-3
2021-08-02 18:08:48 +00:00
= f.gitlab_ui_checkbox_component :mentions_disabled,
s_('GroupSettings|Disable group mentions'),
checkbox_options: { checked: @group.mentions_disabled? },
2021-09-30 21:11:33 +00:00
help_text: s_('GroupSettings|Prevents group members from being notified if the group is mentioned.')
2019-12-03 12:06:34 +00:00
2022-01-17 12:17:11 +00:00
= render 'groups/settings/resource_access_token_creation', f: f, group: @group
2020-07-15 00:09:23 +00:00
= render_if_exists 'groups/settings/delayed_project_removal', f: f, group: @group
2022-01-12 15:13:54 +00:00
= render 'groups/settings/ip_restriction_registration_features_cta', f: f
2019-06-17 15:20:43 +00:00
= render_if_exists 'groups/settings/ip_restriction', f: f, group: @group
2019-08-16 22:04:21 +00:00
= render_if_exists 'groups/settings/allowed_email_domain', f: f, group: @group
2018-10-15 13:36:19 +00:00
= render 'groups/settings/lfs', f: f
2020-04-24 09:09:44 +00:00
= render 'groups/settings/default_branch_protection', f: f, group: @group
2019-04-05 18:49:46 +00:00
= render 'groups/settings/project_creation_level', f: f, group: @group
2019-06-27 21:11:09 +00:00
= render 'groups/settings/subgroup_creation_level', f: f, group: @group
2020-08-04 15:09:27 +00:00
= render_if_exists 'groups/settings/prevent_forking', f: f, group: @group
2020-10-15 21:09:12 +00:00
= render 'groups/settings/two_factor_auth', f: f, group: @group
2020-04-15 12:09:18 +00:00
= render_if_exists 'groups/personal_access_token_expiration_policy', f: f, group: @group
2021-09-09 09:11:16 +00:00
= render 'groups/settings/membership', f: f, group: @group
2022-01-08 00:14:32 +00:00
- if crm_feature_flag_enabled?(@group)
%h5= _('Customer relations')
.form-group.gl-mb-3
= f.gitlab_ui_checkbox_component :crm_enabled,
s_('GroupSettings|Enable customer relations'),
checkbox_options: { checked: @group.crm_enabled? },
help_text: s_('GroupSettings|Allows creating organizations and contacts and associating them with issues.')
2021-03-05 15:09:12 +00:00
= f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mt-3 js-dirty-submit', data: { qa_selector: 'save_permissions_changes_button' }