Skip to content

Commit f0abe9d

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent e97635e commit f0abe9d

File tree

42 files changed

+551
-287
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+551
-287
lines changed

.rubocop_todo/layout/argument_alignment.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,6 @@ Layout/ArgumentAlignment:
14961496
- 'ee/spec/features/search/elastic/global_search_spec.rb'
14971497
- 'ee/spec/features/search/elastic/group_search_spec.rb'
14981498
- 'ee/spec/features/security/project/discover_spec.rb'
1499-
- 'ee/spec/features/uncompleted_learn_gitlab_link_spec.rb'
15001499
- 'ee/spec/features/users/identity_verification_spec.rb'
15011500
- 'ee/spec/finders/boards/milestones_finder_spec.rb'
15021501
- 'ee/spec/finders/epics/cross_hierarchy_ancestors_finder_spec.rb'

.rubocop_todo/layout/line_continuation_leading_space.yml

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ Layout/LineContinuationLeadingSpace:
5252
- 'rubocop/cop/migration/update_column_in_batches.rb'
5353
- 'scripts/lib/glfm/parse_examples.rb'
5454
- 'scripts/qa/testcases-check'
55-
- 'spec/features/groups/show_spec.rb'
5655
- 'spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb'
5756
- 'spec/lib/gitlab/ci/ansi2html_spec.rb'
5857
- 'spec/lib/gitlab/ci/parsers/sbom/validators/cyclonedx_schema_validator_spec.rb'

.rubocop_todo/layout/line_end_string_concatenation_indentation.yml

-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ Layout/LineEndStringConcatenationIndentation:
262262
- 'spec/contracts/provider_specs/helpers/provider/contract_source_helper_spec.rb'
263263
- 'spec/controllers/graphql_controller_spec.rb'
264264
- 'spec/controllers/projects/deploy_keys_controller_spec.rb'
265-
- 'spec/features/groups/show_spec.rb'
266265
- 'spec/features/projects/files/user_browses_files_spec.rb'
267266
- 'spec/features/projects/files/user_creates_directory_spec.rb'
268267
- 'spec/features/projects/files/user_creates_files_spec.rb'

.rubocop_todo/layout/line_length.yml

-4
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,6 @@ Layout/LineLength:
16231623
- 'ee/spec/features/invites_spec.rb'
16241624
- 'ee/spec/features/issues/filtered_search/filter_issues_weight_spec.rb'
16251625
- 'ee/spec/features/issues/form_spec.rb'
1626-
- 'ee/spec/features/issues/issue_sidebar_spec.rb'
16271626
- 'ee/spec/features/labels_hierarchy_spec.rb'
16281627
- 'ee/spec/features/merge_request/user_approves_spec.rb'
16291628
- 'ee/spec/features/merge_request/user_approves_with_password_spec.rb'
@@ -3630,7 +3629,6 @@ Layout/LineLength:
36303629
- 'spec/features/merge_request/user_comments_on_diff_spec.rb'
36313630
- 'spec/features/merge_request/user_creates_image_diff_notes_spec.rb'
36323631
- 'spec/features/merge_request/user_creates_merge_request_spec.rb'
3633-
- 'spec/features/merge_request/user_edits_assignees_sidebar_spec.rb'
36343632
- 'spec/features/merge_request/user_expands_diff_spec.rb'
36353633
- 'spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb'
36363634
- 'spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb'
@@ -3925,7 +3923,6 @@ Layout/LineLength:
39253923
- 'spec/helpers/markup_helper_spec.rb'
39263924
- 'spec/helpers/members_helper_spec.rb'
39273925
- 'spec/helpers/namespaces_helper_spec.rb'
3928-
- 'spec/helpers/nav/new_dropdown_helper_spec.rb'
39293926
- 'spec/helpers/notes_helper_spec.rb'
39303927
- 'spec/helpers/operations_helper_spec.rb'
39313928
- 'spec/helpers/profiles_helper_spec.rb'
@@ -3935,7 +3932,6 @@ Layout/LineLength:
39353932
- 'spec/helpers/projects_helper_spec.rb'
39363933
- 'spec/helpers/registrations_helper_spec.rb'
39373934
- 'spec/helpers/search_helper_spec.rb'
3938-
- 'spec/helpers/sidebars_helper_spec.rb'
39393935
- 'spec/helpers/sidekiq_helper_spec.rb'
39403936
- 'spec/helpers/snippets_helper_spec.rb'
39413937
- 'spec/helpers/sorting_helper_spec.rb'

.rubocop_todo/rspec/context_wording.yml

-6
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ RSpec/ContextWording:
122122
- 'ee/spec/features/issues/filtered_search/filter_issues_by_iteration_spec.rb'
123123
- 'ee/spec/features/issues/form_spec.rb'
124124
- 'ee/spec/features/issues/gfm_autocomplete_ee_spec.rb'
125-
- 'ee/spec/features/issues/issue_sidebar_spec.rb'
126125
- 'ee/spec/features/issues/user_bulk_edits_issues_spec.rb'
127126
- 'ee/spec/features/labels_hierarchy_spec.rb'
128127
- 'ee/spec/features/markdown/markdown_spec.rb'
@@ -908,7 +907,6 @@ RSpec/ContextWording:
908907
- 'ee/spec/views/compliance_management/compliance_framework/_project_settings.html.haml_spec.rb'
909908
- 'ee/spec/views/groups/edit.html.haml_spec.rb'
910909
- 'ee/spec/views/groups/security/discover/show.html.haml_spec.rb'
911-
- 'ee/spec/views/layouts/header/_new_dropdown.haml_spec.rb'
912910
- 'ee/spec/views/layouts/header/_read_only_banner.html.haml_spec.rb'
913911
- 'ee/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb'
914912
- 'ee/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb'
@@ -1178,7 +1176,6 @@ RSpec/ContextWording:
11781176
- 'spec/features/groups/settings/group_badges_spec.rb'
11791177
- 'spec/features/groups/settings/repository_spec.rb'
11801178
- 'spec/features/groups/share_lock_spec.rb'
1181-
- 'spec/features/groups/show_spec.rb'
11821179
- 'spec/features/groups/user_sees_package_sidebar_spec.rb'
11831180
- 'spec/features/groups_spec.rb'
11841181
- 'spec/features/help_pages_spec.rb'
@@ -1200,7 +1197,6 @@ RSpec/ContextWording:
12001197
- 'spec/features/issues/gfm_autocomplete_spec.rb'
12011198
- 'spec/features/issues/issue_detail_spec.rb'
12021199
- 'spec/features/issues/issue_header_spec.rb'
1203-
- 'spec/features/issues/issue_sidebar_spec.rb'
12041200
- 'spec/features/issues/keyboard_shortcut_spec.rb'
12051201
- 'spec/features/issues/move_spec.rb'
12061202
- 'spec/features/issues/note_polling_spec.rb'
@@ -1257,7 +1253,6 @@ RSpec/ContextWording:
12571253
- 'spec/features/merge_requests/user_lists_merge_requests_spec.rb'
12581254
- 'spec/features/merge_requests/user_mass_updates_spec.rb'
12591255
- 'spec/features/milestones/user_views_milestone_spec.rb'
1260-
- 'spec/features/nav/top_nav_responsive_spec.rb'
12611256
- 'spec/features/oauth_login_spec.rb'
12621257
- 'spec/features/one_trust_spec.rb'
12631258
- 'spec/features/participants_autocomplete_spec.rb'
@@ -3263,7 +3258,6 @@ RSpec/ContextWording:
32633258
- 'spec/views/groups/edit.html.haml_spec.rb'
32643259
- 'spec/views/layouts/_header_search.html.haml_spec.rb'
32653260
- 'spec/views/layouts/application.html.haml_spec.rb'
3266-
- 'spec/views/layouts/header/_new_dropdown.haml_spec.rb'
32673261
- 'spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb'
32683262
- 'spec/views/notify/changed_milestone_email.html.haml_spec.rb'
32693263
- 'spec/views/profiles/keys/_key.html.haml_spec.rb'

.rubocop_todo/rspec/factory_bot/avoid_create.yml

-6
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ RSpec/FactoryBot/AvoidCreate:
204204
- 'ee/spec/views/groups/billings/index.html.haml_spec.rb'
205205
- 'ee/spec/views/groups/edit.html.haml_spec.rb'
206206
- 'ee/spec/views/groups/feature_discovery_moments/advanced_features_dashboard.html.haml_spec.rb'
207-
- 'ee/spec/views/groups/group_members/index.html.haml_spec.rb'
208207
- 'ee/spec/views/groups/hook_logs/show.html.haml_spec.rb'
209208
- 'ee/spec/views/groups/hooks/edit.html.haml_spec.rb'
210209
- 'ee/spec/views/groups/security/discover/show.html.haml_spec.rb'
@@ -214,7 +213,6 @@ RSpec/FactoryBot/AvoidCreate:
214213
- 'ee/spec/views/layouts/application.html.haml_spec.rb'
215214
- 'ee/spec/views/layouts/group.html.haml_spec.rb'
216215
- 'ee/spec/views/layouts/header/_current_user_dropdown.html.haml_spec.rb'
217-
- 'ee/spec/views/layouts/header/_new_dropdown.haml_spec.rb'
218216
- 'ee/spec/views/layouts/header/_read_only_banner.html.haml_spec.rb'
219217
- 'ee/spec/views/layouts/header/help_dropdown/_cross_stage_fdm.html.haml_spec.rb'
220218
- 'ee/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb'
@@ -223,7 +221,6 @@ RSpec/FactoryBot/AvoidCreate:
223221
- 'ee/spec/views/projects/edit.html.haml_spec.rb'
224222
- 'ee/spec/views/projects/issues/show.html.haml_spec.rb'
225223
- 'ee/spec/views/projects/on_demand_scans/index.html.haml_spec.rb'
226-
- 'ee/spec/views/projects/project_members/index.html.haml_spec.rb'
227224
- 'ee/spec/views/projects/security/corpus_management/show.html.haml_spec.rb'
228225
- 'ee/spec/views/projects/security/dast_profiles/show.html.haml_spec.rb'
229226
- 'ee/spec/views/projects/security/dast_scanner_profiles/edit.html.haml_spec.rb'
@@ -567,14 +564,12 @@ RSpec/FactoryBot/AvoidCreate:
567564
- 'spec/views/events/event/_common.html.haml_spec.rb'
568565
- 'spec/views/groups/_home_panel.html.haml_spec.rb'
569566
- 'spec/views/groups/edit.html.haml_spec.rb'
570-
- 'spec/views/groups/group_members/index.html.haml_spec.rb'
571567
- 'spec/views/groups/new.html.haml_spec.rb'
572568
- 'spec/views/help/instance_configuration.html.haml_spec.rb'
573569
- 'spec/views/layouts/_search.html.haml_spec.rb'
574570
- 'spec/views/layouts/application.html.haml_spec.rb'
575571
- 'spec/views/layouts/devise.html.haml_spec.rb'
576572
- 'spec/views/layouts/fullscreen.html.haml_spec.rb'
577-
- 'spec/views/layouts/header/_new_dropdown.haml_spec.rb'
578573
- 'spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb'
579574
- 'spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb'
580575
- 'spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb'
@@ -625,7 +620,6 @@ RSpec/FactoryBot/AvoidCreate:
625620
- 'spec/views/projects/pages_domains/show.html.haml_spec.rb'
626621
- 'spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb'
627622
- 'spec/views/projects/pipelines/show.html.haml_spec.rb'
628-
- 'spec/views/projects/project_members/index.html.haml_spec.rb'
629623
- 'spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb'
630624
- 'spec/views/projects/settings/integrations/edit.html.haml_spec.rb'
631625
- 'spec/views/projects/settings/merge_requests/show.html.haml_spec.rb'

.rubocop_todo/rspec/missing_feature_category.yml

-11
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,6 @@ RSpec/MissingFeatureCategory:
612612
- 'ee/spec/helpers/manual_quarterly_co_term_banner_helper_spec.rb'
613613
- 'ee/spec/helpers/markup_helper_spec.rb'
614614
- 'ee/spec/helpers/merge_requests_helper_spec.rb'
615-
- 'ee/spec/helpers/nav/new_dropdown_helper_spec.rb'
616-
- 'ee/spec/helpers/nav/top_nav_helper_spec.rb'
617615
- 'ee/spec/helpers/notes_helper_spec.rb'
618616
- 'ee/spec/helpers/path_locks_helper_spec.rb'
619617
- 'ee/spec/helpers/preferences_helper_spec.rb'
@@ -2318,7 +2316,6 @@ RSpec/MissingFeatureCategory:
23182316
- 'ee/spec/views/groups/compliance_frameworks/new.html.haml_spec.rb'
23192317
- 'ee/spec/views/groups/edit.html.haml_spec.rb'
23202318
- 'ee/spec/views/groups/feature_discovery_moments/advanced_features_dashboard.html.haml_spec.rb'
2321-
- 'ee/spec/views/groups/group_members/index.html.haml_spec.rb'
23222319
- 'ee/spec/views/groups/hook_logs/show.html.haml_spec.rb'
23232320
- 'ee/spec/views/groups/hooks/edit.html.haml_spec.rb'
23242321
- 'ee/spec/views/groups/security/discover/show.html.haml_spec.rb'
@@ -2330,7 +2327,6 @@ RSpec/MissingFeatureCategory:
23302327
- 'ee/spec/views/layouts/group.html.haml_spec.rb'
23312328
- 'ee/spec/views/layouts/header/_current_user_dropdown.html.haml_spec.rb'
23322329
- 'ee/spec/views/layouts/header/_ee_subscribable_banner.html.haml_spec.rb'
2333-
- 'ee/spec/views/layouts/header/_new_dropdown.haml_spec.rb'
23342330
- 'ee/spec/views/layouts/header/_read_only_banner.html.haml_spec.rb'
23352331
- 'ee/spec/views/layouts/header/help_dropdown/_cross_stage_fdm.html.haml_spec.rb'
23362332
- 'ee/spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb'
@@ -2344,7 +2340,6 @@ RSpec/MissingFeatureCategory:
23442340
- 'ee/spec/views/projects/edit.html.haml_spec.rb'
23452341
- 'ee/spec/views/projects/issues/show.html.haml_spec.rb'
23462342
- 'ee/spec/views/projects/on_demand_scans/index.html.haml_spec.rb'
2347-
- 'ee/spec/views/projects/project_members/index.html.haml_spec.rb'
23482343
- 'ee/spec/views/projects/security/corpus_management/show.html.haml_spec.rb'
23492344
- 'ee/spec/views/projects/security/dast_profiles/show.html.haml_spec.rb'
23502345
- 'ee/spec/views/projects/security/dast_scanner_profiles/edit.html.haml_spec.rb'
@@ -3616,7 +3611,6 @@ RSpec/MissingFeatureCategory:
36163611
- 'spec/helpers/merge_requests_helper_spec.rb'
36173612
- 'spec/helpers/milestones_helper_spec.rb'
36183613
- 'spec/helpers/namespaces_helper_spec.rb'
3619-
- 'spec/helpers/nav/new_dropdown_helper_spec.rb'
36203614
- 'spec/helpers/nav/top_nav_helper_spec.rb'
36213615
- 'spec/helpers/nav_helper_spec.rb'
36223616
- 'spec/helpers/notes_helper_spec.rb'
@@ -3649,7 +3643,6 @@ RSpec/MissingFeatureCategory:
36493643
- 'spec/helpers/routing/pseudonymization_helper_spec.rb'
36503644
- 'spec/helpers/rss_helper_spec.rb'
36513645
- 'spec/helpers/sessions_helper_spec.rb'
3652-
- 'spec/helpers/sidebars_helper_spec.rb'
36533646
- 'spec/helpers/sidekiq_helper_spec.rb'
36543647
- 'spec/helpers/snippets_helper_spec.rb'
36553648
- 'spec/helpers/sorting_helper_spec.rb'
@@ -5299,7 +5292,6 @@ RSpec/MissingFeatureCategory:
52995292
- 'spec/lib/gitlab/multi_destination_logger_spec.rb'
53005293
- 'spec/lib/gitlab/namespaced_session_store_spec.rb'
53015294
- 'spec/lib/gitlab/nav/top_nav_menu_header_spec.rb'
5302-
- 'spec/lib/gitlab/nav/top_nav_menu_item_spec.rb'
53035295
- 'spec/lib/gitlab/net_http_adapter_spec.rb'
53045296
- 'spec/lib/gitlab/no_cache_headers_spec.rb'
53055297
- 'spec/lib/gitlab/noteable_metadata_spec.rb'
@@ -7907,7 +7899,6 @@ RSpec/MissingFeatureCategory:
79077899
- 'spec/views/events/event/_push.html.haml_spec.rb'
79087900
- 'spec/views/groups/_home_panel.html.haml_spec.rb'
79097901
- 'spec/views/groups/edit.html.haml_spec.rb'
7910-
- 'spec/views/groups/group_members/index.html.haml_spec.rb'
79117902
- 'spec/views/groups/milestones/index.html.haml_spec.rb'
79127903
- 'spec/views/groups/new.html.haml_spec.rb'
79137904
- 'spec/views/groups/observability/observability.html.haml_spec.rb'
@@ -7927,7 +7918,6 @@ RSpec/MissingFeatureCategory:
79277918
- 'spec/views/layouts/devise_empty.html.haml_spec.rb'
79287919
- 'spec/views/layouts/fullscreen.html.haml_spec.rb'
79297920
- 'spec/views/layouts/header/_gitlab_version.html.haml_spec.rb'
7930-
- 'spec/views/layouts/header/_new_dropdown.haml_spec.rb'
79317921
- 'spec/views/layouts/nav/sidebar/_admin.html.haml_spec.rb'
79327922
- 'spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb'
79337923
- 'spec/views/layouts/nav/sidebar/_profile.html.haml_spec.rb'
@@ -7987,7 +7977,6 @@ RSpec/MissingFeatureCategory:
79877977
- 'spec/views/projects/pages/show.html.haml_spec.rb'
79887978
- 'spec/views/projects/pages_domains/show.html.haml_spec.rb'
79897979
- 'spec/views/projects/pipeline_schedules/_pipeline_schedule.html.haml_spec.rb'
7990-
- 'spec/views/projects/project_members/index.html.haml_spec.rb'
79917980
- 'spec/views/projects/settings/ci_cd/_autodevops_form.html.haml_spec.rb'
79927981
- 'spec/views/projects/settings/integrations/edit.html.haml_spec.rb'
79937982
- 'spec/views/projects/settings/merge_requests/show.html.haml_spec.rb'

.rubocop_todo/rspec/return_from_stub.yml

-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ RSpec/ReturnFromStub:
99
- 'ee/spec/helpers/ee/lock_helper_spec.rb'
1010
- 'ee/spec/helpers/ee/operations_helper_spec.rb'
1111
- 'ee/spec/helpers/ee/security_orchestration_helper_spec.rb'
12-
- 'ee/spec/helpers/nav/new_dropdown_helper_spec.rb'
13-
- 'ee/spec/helpers/nav/top_nav_helper_spec.rb'
1412
- 'ee/spec/helpers/preferences_helper_spec.rb'
1513
- 'ee/spec/lib/banzai/filter/cross_project_issuable_information_filter_spec.rb'
1614
- 'ee/spec/lib/banzai/filter/issuable_reference_expansion_filter_spec.rb'
@@ -121,7 +119,6 @@ RSpec/ReturnFromStub:
121119
- 'spec/helpers/explore_helper_spec.rb'
122120
- 'spec/helpers/groups_helper_spec.rb'
123121
- 'spec/helpers/issues_helper_spec.rb'
124-
- 'spec/helpers/nav/new_dropdown_helper_spec.rb'
125122
- 'spec/helpers/nav/top_nav_helper_spec.rb'
126123
- 'spec/helpers/nav_helper_spec.rb'
127124
- 'spec/helpers/operations_helper_spec.rb'

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dfcd599808bc659ab4fdf0efaadb606e2fe95542
1+
954816989a09915efa2cad385f92e53b25b01675

app/assets/javascripts/vue_merge_request_widget/components/action_buttons.vue

+50-19
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ export default {
3535
3636
return sprintf(__('%{widget} options'), { widget: this.widget });
3737
},
38+
hasOneOption() {
39+
return this.tertiaryButtons.length === 1;
40+
},
41+
hasMultipleOptions() {
42+
return this.tertiaryButtons.length > 1;
43+
},
3844
},
3945
methods: {
4046
onClickAction(action) {
@@ -75,34 +81,59 @@ export default {
7581

7682
<template>
7783
<div class="gl-display-flex gl-align-items-flex-start">
78-
<gl-dropdown
79-
v-if="tertiaryButtons.length"
80-
v-gl-tooltip
81-
:title="__('Options')"
82-
:text="dropdownLabel"
83-
icon="ellipsis_v"
84-
no-caret
85-
category="tertiary"
86-
right
87-
lazy
88-
text-sr-only
89-
size="small"
90-
toggle-class="gl-p-2!"
91-
class="gl-display-block gl-md-display-none!"
92-
>
93-
<gl-dropdown-item
84+
<template v-if="hasOneOption">
85+
<gl-button
9486
v-for="(btn, index) in tertiaryButtons"
87+
:id="btn.id"
9588
:key="index"
89+
v-gl-tooltip.hover
90+
:title="setTooltip(btn)"
9691
:href="btn.href"
9792
:target="btn.target"
93+
:class="[{ 'gl-mr-3': index !== tertiaryButtons.length - 1 }, btn.class]"
9894
:data-clipboard-text="btn.dataClipboardText"
95+
:data-qa-selector="actionButtonQaSelector(btn)"
9996
:data-method="btn.dataMethod"
97+
:icon="btn.icon"
98+
:data-testid="btn.testId || 'extension-actions-button'"
99+
:variant="btn.variant || 'confirm'"
100+
:loading="btn.loading"
101+
:disabled="btn.loading"
102+
category="tertiary"
103+
size="small"
104+
class="gl-md-display-block gl-float-left"
100105
@click="onClickAction(btn)"
101106
>
102107
{{ btn.text }}
103-
</gl-dropdown-item>
104-
</gl-dropdown>
105-
<template v-if="tertiaryButtons.length">
108+
</gl-button>
109+
</template>
110+
<template v-if="hasMultipleOptions">
111+
<gl-dropdown
112+
v-gl-tooltip
113+
:title="__('Options')"
114+
:text="dropdownLabel"
115+
icon="ellipsis_v"
116+
no-caret
117+
category="tertiary"
118+
right
119+
lazy
120+
text-sr-only
121+
size="small"
122+
toggle-class="gl-p-2!"
123+
class="gl-display-block gl-md-display-none!"
124+
>
125+
<gl-dropdown-item
126+
v-for="(btn, index) in tertiaryButtons"
127+
:key="index"
128+
:href="btn.href"
129+
:target="btn.target"
130+
:data-clipboard-text="btn.dataClipboardText"
131+
:data-method="btn.dataMethod"
132+
@click="onClickAction(btn)"
133+
>
134+
{{ btn.text }}
135+
</gl-dropdown-item>
136+
</gl-dropdown>
106137
<gl-button
107138
v-for="(btn, index) in tertiaryButtons"
108139
:id="btn.id"

app/assets/javascripts/work_items/components/work_item_assignees.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export default {
313313
:view-only="!canUpdate"
314314
:allow-clear-all="isEditing"
315315
class="assignees-selector gl-flex-grow-1 gl-border gl-border-white gl-rounded-base col-9 gl-align-self-start gl-px-0! gl-mx-2"
316-
data-testid="work-item-asssignees-input"
316+
data-testid="work-item-assignees-input"
317317
@input="handleAssigneesInput"
318318
@text-input="debouncedSearchKeyUpdate"
319319
@focus="handleFocus"

app/models/members/member_role.rb

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
class MemberRole < ApplicationRecord # rubocop:disable Gitlab/NamespacedClass
3+
class MemberRole < ApplicationRecord # rubocop:disable Gitlab/NamespacedClass
44
include IgnorableColumns
55
ignore_column :download_code, remove_with: '15.9', remove_after: '2023-01-22'
66

@@ -15,6 +15,8 @@ class MemberRole < ApplicationRecord # rubocop:disable Gitlab/NamespacedClass
1515

1616
validates_associated :members
1717

18+
before_destroy :prevent_delete_after_member_associated
19+
1820
private
1921

2022
def belongs_to_top_level_namespace
@@ -35,4 +37,13 @@ def attributes_locked_after_member_associated
3537
errors.add(:base, s_("MemberRole|cannot be changed because it is already assigned to a user. "\
3638
"Please create a new Member Role instead"))
3739
end
40+
41+
def prevent_delete_after_member_associated
42+
return unless members.present?
43+
44+
errors.add(:base, s_("MemberRole|cannot be deleted because it is already assigned to a user. "\
45+
"Please disassociate the member role from all users before deletion."))
46+
47+
throw :abort # rubocop:disable Cop/BanCatchThrow
48+
end
3849
end

0 commit comments

Comments
 (0)