Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2025-05-27 18:07:19 +00:00
parent 6fc09e950b
commit d4e9ba0deb
38 changed files with 327 additions and 105 deletions

View File

@ -1,15 +0,0 @@
---
# Cop supports --autocorrect.
Performance/FlatMap:
Exclude:
- 'app/services/projects/apple_target_platform_detector_service.rb'
- 'ee/app/models/burndown.rb'
- 'ee/app/models/geo_node_status.rb'
- 'ee/app/serializers/dashboard_environments_serializer.rb'
- 'ee/spec/requests/api/members_spec.rb'
- 'ee/spec/support/helpers/license_scanning_report_helpers.rb'
- 'lib/gitlab/ci/pipeline/chain/ensure_environments.rb'
- 'lib/gitlab/ci/pipeline/chain/ensure_resource_groups.rb'
- 'lib/gitlab/diff/file_collection/base.rb'
- 'lib/gitlab/instrumentation/redis_cluster_validator.rb'
- 'lib/gitlab/testing/request_inspector_middleware.rb'

View File

@ -9,6 +9,13 @@ export default {
components: {
GlBreadcrumb,
},
props: {
staticBreadcrumbs: {
type: Object,
default: () => ({ items: [] }),
required: false,
},
},
computed: {
rootRoute() {
return this.$router.options.routes.find((r) => r.meta.root);
@ -35,7 +42,9 @@ export default {
});
}
return routeInfoList;
const staticCrumbs = this.staticBreadcrumbs.items;
return [...staticCrumbs, ...routeInfoList];
},
isLoaded() {
return this.isRootRoute || last(this.currentRoute).text;
@ -50,7 +59,9 @@ export default {
if (!this.isRootRoute) {
crumbs = crumbs.concat(this.currentRoute);
}
return crumbs;
const staticCrumbs = this.staticBreadcrumbs.items;
return [...staticCrumbs, ...crumbs];
},
},
};

View File

@ -77,7 +77,17 @@ export default (id) => {
};
return {
attachBreadcrumb: () => injectVueAppBreadcrumbs(router, RegistryBreadcrumb),
attachBreadcrumb: () =>
injectVueAppBreadcrumbs(
router,
RegistryBreadcrumb,
null,
{},
{
// cf. https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186906
singleNavOptIn: true,
},
),
attachMainComponent,
};
};

View File

@ -183,7 +183,7 @@ export default {
return (
this.issuable.assignees?.nodes ||
this.issuable.assignees ||
this.issuable.widgets?.find(isAssigneesWidget)?.assignees.nodes ||
this.issuable.widgets?.find(isAssigneesWidget)?.assignees?.nodes ||
[]
);
},

View File

@ -1,6 +1,6 @@
<script>
import { GlButton, GlFilteredSearchToken, GlLoadingIcon } from '@gitlab/ui';
import { isEmpty, unionBy } from 'lodash';
import { capitalize, isEmpty, unionBy } from 'lodash';
import * as Sentry from '~/sentry/sentry_browser_wrapper';
import IssueCardStatistics from 'ee_else_ce/issues/list/components/issue_card_statistics.vue';
import IssueCardTimeInfo from 'ee_else_ce/issues/list/components/issue_card_time_info.vue';
@ -202,6 +202,7 @@ export default {
hasStateToken: false,
initialLoadWasFiltered: false,
showLocalBoard: false,
namespaceId: null,
};
},
apollo: {
@ -221,6 +222,7 @@ export default {
return isEmpty(this.pageParams);
},
result({ data }) {
this.namespaceId = data?.[this.namespace]?.id;
this.handleListDataResults(data);
},
error(error) {
@ -664,11 +666,11 @@ export default {
const findSlimItem = (id) => slim.find((item) => item.id === id);
return full.map((fullItem) => {
const slimVersion = findSlimItem(fullItem.id);
const combinedWidgets = unionBy(fullItem.widgets, slimVersion.widgets, 'type');
const combinedWidgets = unionBy(fullItem.widgets, slimVersion?.widgets, 'type');
return {
...fullItem,
widgets: combinedWidgets.reduce((acc, widget) => {
const slimWidget = slimVersion.widgets.find((w) => w.type === widget.type);
const slimWidget = slimVersion?.widgets.find((w) => w.type === widget.type);
if (slimWidget && Object.keys(slimWidget).length > Object.keys(widget).length) {
acc.push(slimWidget);
} else {
@ -826,24 +828,28 @@ export default {
},
deleteItem() {
this.activeItem = null;
this.refetchItems();
this.refetchItems({ refetchCounts: true });
},
handleStatusChange(workItem) {
if (this.state === STATUS_ALL) {
return;
}
if (statusMap[this.state] !== workItem.state) {
this.refetchItems();
this.refetchItems({ refetchCounts: true });
}
},
async refetchItems({ refetchCounts = false } = {}) {
this.isRefetching = true;
this.$apollo.queries.workItemsFull.refetch();
this.$apollo.queries.workItemsSlim.refetch();
if (refetchCounts) {
this.$apollo.queries.workItemStateCounts.refetch();
}
this.isRefetching = false;
// evict the namespace's workItems cache to force a full refetch
const { cache } = this.$apollo.provider.defaultClient;
cache.evict({
id: cache.identify({ __typename: capitalize(this.namespace), id: this.namespaceId }),
fieldName: 'workItems',
});
cache.gc();
},
updateData(sort) {
const firstPageSize = getParameterByName(PARAM_FIRST_PAGE_SIZE);

View File

@ -50,9 +50,9 @@ module Projects
# (Gitlab::Search::FoundBlob) that contain the setting definition string
# "SDKROOT = <sdk_name>"
def config_files_containing_sdk_setting(sdk)
BUILD_CONFIG_FILENAMES.map do |filename|
BUILD_CONFIG_FILENAMES.flat_map do |filename|
file_finder.find("SDKROOT = #{sdk} filename:#{filename}")
end.flatten
end
end
end
end

View File

@ -0,0 +1,23 @@
description: Command is executed from the GitLab CLI
internal_events: true
action: gitlab_cli_command_used
identifiers:
- project
- namespace
- user
additional_properties:
label:
description: Command used - e.g. 'mr'
property:
description: Subcommand used - e.g. 'view'
command_and_subcommand:
description: Command and subcommand used - e.g. 'mr view'
product_group: code_review
product_categories:
- gitlab_cli
milestone: '18.0'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/185183
tiers:
- free
- premium
- ultimate

View File

@ -6,4 +6,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/437604
milestone: '16.8'
group: group::optimize
type: beta
default_enabled: false
default_enabled: true

View File

@ -1,8 +0,0 @@
---
name: limited_access_modal
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129790
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/424877
milestone: '16.4'
type: development
group: group::subscription management
default_enabled: false

View File

@ -143,10 +143,8 @@
"name": {
"type": "string"
},
"events": {
},
"time_frame": {
}
"events": {},
"time_frame": {}
},
"oneOf": [
{

View File

@ -909,6 +909,8 @@
- 1
- - security_pipeline_execution_policies_run_schedule
- 1
- - security_policies_project_transfer
- 1
- - security_process_scan_result_policy
- 1
- - security_refresh_compliance_framework_security_policies

View File

@ -8,24 +8,7 @@ description: Stores merge access settings for protected branches
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/5081
milestone: '8.11'
gitlab_schema: gitlab_main_cell
desired_sharding_key:
protected_branch_project_id:
references: projects
backfill_via:
parent:
foreign_key: protected_branch_id
table: protected_branches
sharding_key: project_id
belongs_to: protected_branch
protected_branch_namespace_id:
references: namespaces
backfill_via:
parent:
foreign_key: protected_branch_id
table: protected_branches
sharding_key: namespace_id
belongs_to: protected_branch
sharding_key:
protected_branch_project_id: projects
protected_branch_namespace_id: namespaces
table_size: small
desired_sharding_key_migration_job_name:
- BackfillProtectedBranchMergeAccessLevelsProtectedBranchProjectId
- BackfillProtectedBranchMergeAccessLevelsProtectedBranchNamespaceId

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
class AddProtectedBranchMergeAccessLevelsMultiColumnNotNull < Gitlab::Database::Migration[2.3]
disable_ddl_transaction!
milestone '18.1'
def up
add_multi_column_not_null_constraint :protected_branch_merge_access_levels, :protected_branch_project_id,
:protected_branch_namespace_id
end
def down
remove_multi_column_not_null_constraint :protected_branch_merge_access_levels, :protected_branch_project_id,
:protected_branch_namespace_id
end
end

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
class AddIdxSecurityPolicyProjectLinksOnProjectIdAndId < Gitlab::Database::Migration[2.3]
milestone '18.1'
disable_ddl_transaction!
INDEX_NAME = 'idx_security_policy_project_links_on_project_id_and_id'
def up
add_concurrent_index :security_policy_project_links, [:project_id, :id], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :security_policy_project_links, INDEX_NAME
end
end

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
class AddIdxApprovalPolicyRuleProjectLinksOnProjectIdAndId < Gitlab::Database::Migration[2.3]
milestone '18.1'
disable_ddl_transaction!
INDEX_NAME = 'idx_approval_policy_rule_project_links_on_project_id_and_id'
def up
add_concurrent_index :approval_policy_rule_project_links, [:project_id, :id], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :approval_policy_rule_project_links, INDEX_NAME
end
end

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
class DropIndexSecurityPolicyProjectLinksOnProjectId < Gitlab::Database::Migration[2.3]
milestone '18.1'
disable_ddl_transaction!
INDEX_NAME = 'index_security_policy_project_links_on_project_id'
def up
remove_concurrent_index_by_name :security_policy_project_links, INDEX_NAME
end
def down
add_concurrent_index :security_policy_project_links, :project_id, name: INDEX_NAME
end
end

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
class DropIndexApprovalPolicyRuleProjectLinksOnProjectId < Gitlab::Database::Migration[2.3]
milestone '18.1'
disable_ddl_transaction!
INDEX_NAME = 'index_approval_policy_rule_project_links_on_project_id'
def up
remove_concurrent_index_by_name :approval_policy_rule_project_links, INDEX_NAME
end
def down
add_concurrent_index :approval_policy_rule_project_links, :project_id, name: INDEX_NAME
end
end

View File

@ -0,0 +1 @@
cd7c4a51bc52c85c99c152d4411743884b645de0de41df9d0af4019eabaa55b6

View File

@ -0,0 +1 @@
1da143c5ddbd44e5edf0c0867747176e9164607ce8c66af3a451339993be8c34

View File

@ -0,0 +1 @@
8c6f66baa400c8e3e82c7103e757f5779ec36aac1a892dfc5c4615bcf1bcb745

View File

@ -0,0 +1 @@
89f70b3f3d35c98bdb34f9f656d0aaf6dde6f5dc758b0861239639e91d123993

View File

@ -0,0 +1 @@
5fb36f2ccf8714fe1cf833f8ac9ec1f8c6a9096025aee061c98df27200852a6c

View File

@ -21758,7 +21758,8 @@ CREATE TABLE protected_branch_merge_access_levels (
user_id bigint,
group_id bigint,
protected_branch_project_id bigint,
protected_branch_namespace_id bigint
protected_branch_namespace_id bigint,
CONSTRAINT check_66e95f5ee9 CHECK ((num_nonnulls(protected_branch_namespace_id, protected_branch_project_id) = 1))
);
CREATE SEQUENCE protected_branch_merge_access_levels_id_seq
@ -33289,6 +33290,8 @@ CREATE INDEX idx_approval_merge_request_rules_on_scan_result_policy_id ON approv
CREATE INDEX idx_approval_mr_rules_on_config_id_and_id_and_updated_at ON approval_merge_request_rules USING btree (security_orchestration_policy_configuration_id, id, updated_at);
CREATE INDEX idx_approval_policy_rule_project_links_on_project_id_and_id ON approval_policy_rule_project_links USING btree (project_id, id);
CREATE INDEX idx_approval_policy_rules_security_policy_id_id ON approval_policy_rules USING btree (security_policy_id, id);
CREATE INDEX idx_approval_project_rules_on_config_id_and_policy_rule_id ON approval_project_rules USING btree (security_orchestration_policy_configuration_id, approval_policy_rule_id);
@ -33643,6 +33646,8 @@ CREATE INDEX idx_security_pipeline_execution_project_schedules_next_run_at ON se
CREATE INDEX idx_security_policies_config_id_policy_index ON security_policies USING btree (security_orchestration_policy_configuration_id, policy_index);
CREATE INDEX idx_security_policy_project_links_on_project_id_and_id ON security_policy_project_links USING btree (project_id, id);
CREATE UNIQUE INDEX idx_security_scans_on_build_and_scan_type ON security_scans USING btree (build_id, scan_type);
CREATE INDEX idx_security_scans_on_scan_type ON security_scans USING btree (scan_type);
@ -34067,8 +34072,6 @@ CREATE INDEX index_approval_mr_rules_on_project_id_policy_rule_id_and_id ON appr
CREATE UNIQUE INDEX index_approval_policy_rule_on_project_and_rule ON approval_policy_rule_project_links USING btree (approval_policy_rule_id, project_id);
CREATE INDEX index_approval_policy_rule_project_links_on_project_id ON approval_policy_rule_project_links USING btree (project_id);
CREATE INDEX index_approval_policy_rules_on_policy_management_project_id ON approval_policy_rules USING btree (security_policy_management_project_id);
CREATE UNIQUE INDEX index_approval_policy_rules_on_unique_policy_rule_index ON approval_policy_rules USING btree (security_policy_id, rule_index);
@ -37421,8 +37424,6 @@ CREATE UNIQUE INDEX index_security_policies_on_unique_config_type_policy_index O
CREATE UNIQUE INDEX index_security_policy_project_links_on_project_and_policy ON security_policy_project_links USING btree (security_policy_id, project_id);
CREATE INDEX index_security_policy_project_links_on_project_id ON security_policy_project_links USING btree (project_id);
CREATE INDEX index_security_policy_requirements_on_compliance_requirement_id ON security_policy_requirements USING btree (compliance_requirement_id);
CREATE INDEX index_security_policy_requirements_on_namespace_id ON security_policy_requirements USING btree (namespace_id);

View File

@ -63,14 +63,14 @@ or when using Geo-related console commands.
| Geo replicator name | GitLab component name |
|--------------------------------|----------------------------------------|
| Ci Secure Files | CI Secure Files |
| CI Secure Files | CI Secure Files |
| Container Repositories | Container registry |
| Dependency Proxy Blobs | Dependency Proxy Images |
| Dependency Proxy Manifests | Dependency Proxy Images |
| Design Management Repositories | Project designs repository |
| Group Wiki Repositories | Group wiki repository |
| Job Artifacts | CI job artifacts |
| Lfs Objects | LFS objects |
| CI Job Artifacts | CI job artifacts |
| LFS Objects | LFS objects |
| Merge Request Diffs | External merge request diffs |
| Package Files | Package registry |
| Pages Deployments | Pages |

View File

@ -39,7 +39,9 @@ Prerequisites:
| `projects_to_exclude` | array of integers | no | The IDs of projects to exclude from the feature. |
```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/7/security_settings?secret_push_protection_enabled=true&projects_to_exclude[]=1&projects_to_exclude[]=2"
curl --request PUT \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/groups/7/security_settings?secret_push_protection_enabled=true&projects_to_exclude[]=1&projects_to_exclude[]=2"
```
Example response:

View File

@ -34,7 +34,9 @@ GET /projects/:id/security_settings
| `id` | integer or string | yes | The ID or [URL-encoded path of the project](rest/_index.md#namespaced-paths). |
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/7/security_settings"
curl --request GET \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/7/security_settings"
```
Example response:
@ -76,7 +78,9 @@ Prerequisites:
| `secret_push_protection_enabled` | boolean | yes | The value to update `secret_push_protection_enabled` to |
```shell
curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/7/security_settings?secret_push_protection_enabled=false"
curl --request PUT \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/projects/7/security_settings?secret_push_protection_enabled=false"
```
Example response:

View File

@ -1320,6 +1320,13 @@ test_job_2:
### `artifacts`
{{< history >}}
- [Updated](https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/5543) in GitLab Runner 18.1. During the caching process,
`symlinks` are no longer followed, which happened in some edge cases with previous GitLab Runner versions.
{{< /history >}}
Use `artifacts` to specify which files to save as [job artifacts](../jobs/job_artifacts.md).
Job artifacts are a list of files and directories that are
attached to the job when it [succeeds, fails, or always](#artifactswhen).
@ -1759,6 +1766,8 @@ job:
{{< history >}}
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/330047) in GitLab 15.0, caches are not shared between protected and unprotected branches.
- [Updated](https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/5543) in GitLab Runner 18.1. During the caching process,
`symlinks` are no longer followed, which happened in some edge cases with previous GitLab Runner versions.
{{< /history >}}

View File

@ -90,7 +90,8 @@ Details of each dependency are listed, sorted by decreasing severity of vulnerab
- Dependency filtering for group [generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/422356) in GitLab 16.10. Feature flag `group_level_dependencies_filtering` removed.
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/513320) dependency filtering for projects in GitLab 17.9 with a flag named [`project_component_filter`](../../../administration/feature_flags.md). Enabled by default.
- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/513321) in GitLab 17.10. Feature flag `project_component_filter` removed.
- Introduced dependency version filtering for [projects](https://gitlab.com/gitlab-org/gitlab/-/issues/520771) and [groups](https://gitlab.com/gitlab-org/gitlab/-/issues/523061) in GitLab 18.0 with [flags](../../../administration/feature_flags.md) named `version_filtering_on_project_level_dependency_list` and `version_filtering_on_group_level_dependency_list`. Disabled by default.
- Dependency version filtering introduced for [projects](https://gitlab.com/gitlab-org/gitlab/-/issues/520771) and [groups](https://gitlab.com/gitlab-org/gitlab/-/issues/523061) in GitLab 18.0 with [flags](../../../administration/feature_flags.md) named `version_filtering_on_project_level_dependency_list` and `version_filtering_on_group_level_dependency_list`. Disabled by default.
- Dependency version filtering [enabled](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/192291) on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in GitLab 18.1.
{{< /history >}}

View File

@ -112,3 +112,9 @@ This error typically occurs when a user attempts to remove the `container_regist
1. Unarchive the project.
1. Delete the `container_registry` images.
1. Archive the project.
## Group owner unable to approve pending users with `Awaiting user signup` badge
Email invitations to non-GitLab users are listed under `Pending members` with the `Awaiting user signup` status.
When the user registers for GitLab.com, the status updates to `Pending owner action` and the group Owner can
complete the approval process.

View File

@ -6,7 +6,7 @@ module Gitlab
module Chain
class EnsureEnvironments < Chain::Base
def perform!
pipeline.stages.map(&:statuses).flatten.each(&method(:ensure_environment))
pipeline.stages.flat_map(&:statuses).each(&method(:ensure_environment))
end
def break?

View File

@ -6,7 +6,7 @@ module Gitlab
module Chain
class EnsureResourceGroups < Chain::Base
def perform!
pipeline.stages.map(&:statuses).flatten.each(&method(:ensure_resource_group))
pipeline.stages.flat_map(&:statuses).each(&method(:ensure_resource_group))
end
def break?

View File

@ -53,7 +53,7 @@ module Gitlab
# This is both the new and old paths for the diff_file
def diff_paths
diff_files.map(&:paths).flatten.uniq
diff_files.flat_map(&:paths).uniq
end
def pagination_data

View File

@ -190,7 +190,7 @@ module Gitlab
command_name = commands.size > 1 ? "PIPELINE/MULTI" : commands.first.first.to_s.upcase
return if commands.size == 1 && REDIS_COMMANDS.dig(command_name, :single_key)
keys = commands.map { |command| extract_keys(command) }.flatten
keys = commands.flat_map { |command| extract_keys(command) }
{
valid: !has_cross_slot_keys?(keys),

View File

@ -65,10 +65,9 @@ module Gitlab
end
def http_headers_env(headers)
Hash[*headers
.collect { |k, v| [k.split('-').collect(&:upcase).join('_'), v] }
.collect { |k, v| [k.prepend('HTTP_'), v] }
.flatten]
headers.transform_keys do |k|
"HTTP_#{k.to_s.split('-').map(&:upcase).join('_')}"
end
end
def log_request(response)

View File

@ -15598,6 +15598,9 @@ msgstr ""
msgid "ComplianceFrameworks|External"
msgstr ""
msgid "ComplianceFrameworks|External Control Name"
msgstr ""
msgid "ComplianceFrameworks|External URL"
msgstr ""
@ -15673,6 +15676,9 @@ msgstr ""
msgid "ComplianceFrameworks|Please enter a valid URL"
msgstr ""
msgid "ComplianceFrameworks|Please enter a valid name"
msgstr ""
msgid "ComplianceFrameworks|Policies"
msgstr ""
@ -27422,6 +27428,18 @@ msgstr ""
msgid "Geo|Allowed Geo IP should contain valid IP addresses"
msgstr ""
msgid "Geo|CI Job Artifact"
msgstr ""
msgid "Geo|CI Job Artifacts"
msgstr ""
msgid "Geo|CI Secure File"
msgstr ""
msgid "Geo|CI Secure Files"
msgstr ""
msgid "Geo|Checksum: %{verificationChecksum}"
msgstr ""
@ -27431,12 +27449,6 @@ msgstr ""
msgid "Geo|Choose specific groups or storage shards"
msgstr ""
msgid "Geo|Ci Secure File"
msgstr ""
msgid "Geo|Ci Secure Files"
msgstr ""
msgid "Geo|Comma-separated, e.g. '1.1.1.1, 2.2.2.0/24'"
msgstr ""
@ -27596,10 +27608,10 @@ msgstr ""
msgid "Geo|Internal URL (optional)"
msgstr ""
msgid "Geo|Job Artifact"
msgid "Geo|LFS Object"
msgstr ""
msgid "Geo|Job Artifacts"
msgid "Geo|LFS Objects"
msgstr ""
msgid "Geo|Last event ID"
@ -27626,12 +27638,6 @@ msgstr ""
msgid "Geo|Learn more about Geo site statuses"
msgstr ""
msgid "Geo|Lfs Object"
msgstr ""
msgid "Geo|Lfs Objects"
msgstr ""
msgid "Geo|Limit the number of concurrent operations this secondary site can run in the background."
msgstr ""
@ -37575,7 +37581,7 @@ msgstr ""
msgid "MemberRole|Are you sure you want to delete this role?"
msgstr ""
msgid "MemberRole|Automatically sync your LDAP directory to custom admin roles."
msgid "MemberRole|Automatically sync your LDAP directory to custom admin roles. For users matched to multiple LDAP syncs, the oldest sync entry will be used."
msgstr ""
msgid "MemberRole|Base role"
@ -37842,7 +37848,7 @@ msgstr ""
msgid "MemberRole|This member is an LDAP user. Changing their role will override the settings from the LDAP group sync."
msgstr ""
msgid "MemberRole|This removes automatic syncing with your LDAP server. Users will keep their current role but future changes will require manual updates. %{confirmStart}Are you sure you want to remove LDAP synchronization?%{confirmEnd}"
msgid "MemberRole|This removes automatic syncing with your LDAP server. Users will have their current role unassigned on the next sync. %{confirmStart}Are you sure you want to remove LDAP synchronization?%{confirmEnd}"
msgstr ""
msgid "MemberRole|This role has been manually selected and will not sync to the LDAP sync role."
@ -37857,6 +37863,9 @@ msgstr ""
msgid "MemberRole|Unable to export role report. Contact support if this error persists."
msgstr ""
msgid "MemberRole|Unknown LDAP server. Please check your server settings."
msgstr ""
msgid "MemberRole|Update role"
msgstr ""

View File

@ -0,0 +1,93 @@
import { shallowMount } from '@vue/test-utils';
import { GlBreadcrumb } from '@gitlab/ui';
import HarborRegistryBreadcrumb from '~/packages_and_registries/harbor_registry/components/harbor_registry_breadcrumb.vue';
describe('HarborRegistryBreadcrumb', () => {
let wrapper;
const findBreadcrumbs = () => wrapper.findComponent(GlBreadcrumb);
const rootRoute = {
name: 'root',
path: '/',
meta: {
root: true,
nameGenerator: () => 'Root',
hrefGenerator: () => '/',
},
};
const detailsRoute = {
name: 'details',
path: '/details',
meta: {
nameGenerator: () => 'Details',
hrefGenerator: () => '/details',
},
};
const createComponent = ({ route, routes, props = {} }) => {
wrapper = shallowMount(HarborRegistryBreadcrumb, {
propsData: props,
mocks: {
$route: route,
$router: { options: { routes } },
},
stubs: {
GlBreadcrumb: {
name: 'GlBreadcrumb',
props: ['items', 'autoResize'],
template: '<nav></nav>',
},
},
});
};
describe('when mounted', () => {
it('renders the root breadcrumb when on root route', () => {
createComponent({
route: { name: 'root', meta: rootRoute.meta },
routes: [rootRoute, detailsRoute],
});
expect(findBreadcrumbs().props('items')).toStrictEqual([{ text: 'Root', to: '/' }]);
});
it('renders both root and current route breadcrumbs when not on root', () => {
createComponent({
route: { name: 'details', meta: detailsRoute.meta },
routes: [rootRoute, detailsRoute],
});
expect(findBreadcrumbs().props('items')).toStrictEqual([
{ text: 'Root', to: '/' },
{ text: 'Details', to: '/details' },
]);
});
});
describe('when static breadcrumbs are provided', () => {
it('renders static breadcrumbs along with route breadcrumbs', () => {
const staticBreadcrumbs = {
items: [{ text: 'Static Item', href: '/static' }],
};
createComponent({
route: { name: 'details', meta: detailsRoute.meta },
routes: [rootRoute, detailsRoute],
props: { staticBreadcrumbs },
});
const items = findBreadcrumbs().props('items');
expect(items[0]).toEqual(staticBreadcrumbs.items[0]);
});
it('handles empty static breadcrumbs', () => {
createComponent({
route: { name: 'details', meta: detailsRoute.meta },
routes: [rootRoute, detailsRoute],
props: { staticBreadcrumbs: { items: [] } },
});
expect(findBreadcrumbs().props('items')).toStrictEqual([
{ text: 'Root', to: '/' },
{ text: 'Details', to: '/details' },
]);
});
});
});

View File

@ -52,6 +52,9 @@ describe('NamespaceStorageApp', () => {
...defaultNamespaceProvideValues,
...provide,
},
stubs: {
StorageUsageStatistics,
},
});
};

View File

@ -709,8 +709,8 @@ describeSkipVue3(skipReason, () => {
checkThatDrawerPropsAreEmpty();
});
it('refetches and resets when work item is deleted', async () => {
expect(defaultQueryHandler).toHaveBeenCalledTimes(1);
it('refetches counts and resets when work item is deleted', async () => {
expect(defaultCountsQueryHandler).toHaveBeenCalledTimes(1);
findDrawer().vm.$emit('workItemDeleted');
@ -718,11 +718,11 @@ describeSkipVue3(skipReason, () => {
checkThatDrawerPropsAreEmpty();
expect(defaultQueryHandler).toHaveBeenCalledTimes(2);
expect(defaultCountsQueryHandler).toHaveBeenCalledTimes(2);
});
it('refetches when the selected work item is closed', async () => {
expect(defaultQueryHandler).toHaveBeenCalledTimes(1);
it('refetches counts when the selected work item is closed', async () => {
expect(defaultCountsQueryHandler).toHaveBeenCalledTimes(1);
// component displays open work items by default
findDrawer().vm.$emit('work-item-updated', {
@ -731,7 +731,7 @@ describeSkipVue3(skipReason, () => {
await nextTick();
expect(defaultQueryHandler).toHaveBeenCalledTimes(2);
expect(defaultCountsQueryHandler).toHaveBeenCalledTimes(2);
});
});
});