diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-02 03:07:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-02 03:07:53 +0300 |
commit | dc483c85ef1b3bcb8dee1fa269ced6e52f48c22c (patch) | |
tree | 8a1d7d84a460a2daf7ef17f1efc71cf27531ef71 | |
parent | f8975b16d11afde69e398a8c607a27e0c05b48f9 (diff) |
Add latest changes from gitlab-org/gitlab@master
22 files changed, 201 insertions, 319 deletions
diff --git a/app/helpers/ci/pipeline_editor_helper.rb b/app/helpers/ci/pipeline_editor_helper.rb index b798a006506..1a30b6bed08 100644 --- a/app/helpers/ci/pipeline_editor_helper.rb +++ b/app/helpers/ci/pipeline_editor_helper.rb @@ -15,7 +15,7 @@ module Ci "ci-examples-help-page-path" => help_page_path('ci/examples/index'), "ci-help-page-path" => help_page_path('ci/index'), "commit-sha" => commit_sha, - "default-branch" => project.default_branch, + "default-branch" => project.default_branch_or_main, "empty-state-illustration-path" => image_path('illustrations/empty-state/empty-dag-md.svg'), "initial-branch-name": params[:branch_name], "lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'), diff --git a/app/policies/release_policy.rb b/app/policies/release_policy.rb index d7f9e5d7445..6f99eb34bb3 100644 --- a/app/policies/release_policy.rb +++ b/app/policies/release_policy.rb @@ -2,4 +2,32 @@ class ReleasePolicy < BasePolicy delegate { @subject.project } + + condition(:protected_tag) do + access = ::Gitlab::UserAccess.new(@user, container: @subject.project) + + !access.can_create_tag?(@subject.tag) + end + + condition(:respect_protected_tag) do + ::Feature.enabled?(:evalute_protected_tag_for_release_permissions, @subject.project, default_enabled: :yaml) + end + + condition(:project_developer) do + can?(:developer_access, @subject.project) + end + + rule { respect_protected_tag & protected_tag }.policy do + prevent :create_release + prevent :update_release + prevent :destroy_release + end + + # NOTE: Developer role (or above) can create, update and destroy release entries. + # When we remove the `evalute_protected_tag_for_release_permissions` feature flag, + # we should move `enable :destroy_release` to ProjectPolicy alongside with . + # See https://gitlab.com/gitlab-org/gitlab/-/issues/327505 for more information. + rule { respect_protected_tag & project_developer }.policy do + enable :destroy_release + end end diff --git a/config/feature_flags/development/evalute_protected_tag_for_release_permissions.yml b/config/feature_flags/development/evalute_protected_tag_for_release_permissions.yml new file mode 100644 index 00000000000..4c8e5abdd4d --- /dev/null +++ b/config/feature_flags/development/evalute_protected_tag_for_release_permissions.yml @@ -0,0 +1,8 @@ +--- +name: evalute_protected_tag_for_release_permissions +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64693 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/334368 +milestone: '14.1' +type: development +group: group::release +default_enabled: false diff --git a/config/metrics/counts_28d/20210216183201_compliance_features_track_unique_visits_union.yml b/config/metrics/counts_28d/20210216183201_compliance_features_track_unique_visits_union.yml deleted file mode 100644 index 3c22304fa86..00000000000 --- a/config/metrics/counts_28d/20210216183201_compliance_features_track_unique_visits_union.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: counts_monthly.aggregated_metrics.compliance_features_track_unique_visits_union -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: 28d -data_source: database -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_28d/20210216183916_compliance_unique_visits_for_any_target_monthly.yml b/config/metrics/counts_28d/20210216183916_compliance_unique_visits_for_any_target_monthly.yml deleted file mode 100644 index 0a63dc0e24e..00000000000 --- a/config/metrics/counts_28d/20210216183916_compliance_unique_visits_for_any_target_monthly.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: compliance_unique_visits.compliance_unique_visits_for_any_target_monthly -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: 28d -data_source: -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_28d/20210216183926_g_compliance_dashboard_monthly.yml b/config/metrics/counts_28d/20210216183926_g_compliance_dashboard_monthly.yml deleted file mode 100644 index baabc62f7ee..00000000000 --- a/config/metrics/counts_28d/20210216183926_g_compliance_dashboard_monthly.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: redis_hll_counters.compliance.g_compliance_dashboard_monthly -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: 28d -data_source: redis_hll -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_28d/20210216183930_g_compliance_audit_events_monthly.yml b/config/metrics/counts_28d/20210216183930_g_compliance_audit_events_monthly.yml deleted file mode 100644 index 64f7540bcfb..00000000000 --- a/config/metrics/counts_28d/20210216183930_g_compliance_audit_events_monthly.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: redis_hll_counters.compliance.g_compliance_audit_events_monthly -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: 28d -data_source: redis_hll -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_28d/20210216183934_i_compliance_audit_events_monthly.yml b/config/metrics/counts_28d/20210216183934_i_compliance_audit_events_monthly.yml deleted file mode 100644 index ccd95890045..00000000000 --- a/config/metrics/counts_28d/20210216183934_i_compliance_audit_events_monthly.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: redis_hll_counters.compliance.i_compliance_audit_events_monthly -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: 28d -data_source: redis_hll -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_28d/20210216183938_i_compliance_credential_inventory_monthly.yml b/config/metrics/counts_28d/20210216183938_i_compliance_credential_inventory_monthly.yml deleted file mode 100644 index 6f2461e58d8..00000000000 --- a/config/metrics/counts_28d/20210216183938_i_compliance_credential_inventory_monthly.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: redis_hll_counters.compliance.i_compliance_credential_inventory_monthly -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: 28d -data_source: redis_hll -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_28d/20210216183942_a_compliance_audit_events_api_monthly.yml b/config/metrics/counts_28d/20210216183942_a_compliance_audit_events_api_monthly.yml deleted file mode 100644 index 2001d65d7c5..00000000000 --- a/config/metrics/counts_28d/20210216183942_a_compliance_audit_events_api_monthly.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: redis_hll_counters.compliance.a_compliance_audit_events_api_monthly -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: 28d -data_source: redis_hll -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_28d/20210216183946_compliance_total_unique_counts_monthly.yml b/config/metrics/counts_28d/20210216183946_compliance_total_unique_counts_monthly.yml deleted file mode 100644 index fdd2cd4cab7..00000000000 --- a/config/metrics/counts_28d/20210216183946_compliance_total_unique_counts_monthly.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: redis_hll_counters.compliance.compliance_total_unique_counts_monthly -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: 28d -data_source: redis_hll -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_all/20210216183904_g_compliance_dashboard.yml b/config/metrics/counts_all/20210216183904_g_compliance_dashboard.yml deleted file mode 100644 index 8447a8742af..00000000000 --- a/config/metrics/counts_all/20210216183904_g_compliance_dashboard.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: compliance_unique_visits.g_compliance_dashboard -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: all -data_source: -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_all/20210216183906_g_compliance_audit_events.yml b/config/metrics/counts_all/20210216183906_g_compliance_audit_events.yml deleted file mode 100644 index bb836d6b510..00000000000 --- a/config/metrics/counts_all/20210216183906_g_compliance_audit_events.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: compliance_unique_visits.g_compliance_audit_events -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: all -data_source: -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_all/20210216183908_i_compliance_audit_events.yml b/config/metrics/counts_all/20210216183908_i_compliance_audit_events.yml deleted file mode 100644 index 69f38276682..00000000000 --- a/config/metrics/counts_all/20210216183908_i_compliance_audit_events.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: compliance_unique_visits.i_compliance_audit_events -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: all -data_source: -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_all/20210216183910_i_compliance_credential_inventory.yml b/config/metrics/counts_all/20210216183910_i_compliance_credential_inventory.yml deleted file mode 100644 index eca419bcd0a..00000000000 --- a/config/metrics/counts_all/20210216183910_i_compliance_credential_inventory.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: compliance_unique_visits.i_compliance_credential_inventory -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: all -data_source: -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_all/20210216183912_a_compliance_audit_events_api.yml b/config/metrics/counts_all/20210216183912_a_compliance_audit_events_api.yml deleted file mode 100644 index 35762ed8a8f..00000000000 --- a/config/metrics/counts_all/20210216183912_a_compliance_audit_events_api.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: compliance_unique_visits.a_compliance_audit_events_api -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: all -data_source: -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/config/metrics/counts_all/20210216183914_compliance_unique_visits_for_any_target.yml b/config/metrics/counts_all/20210216183914_compliance_unique_visits_for_any_target.yml deleted file mode 100644 index 8a875b80cdb..00000000000 --- a/config/metrics/counts_all/20210216183914_compliance_unique_visits_for_any_target.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -data_category: Optional -key_path: compliance_unique_visits.compliance_unique_visits_for_any_target -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number -status: data_available -time_frame: all -data_source: -distribution: -- ce -tier: -- free -skip_validation: true diff --git a/doc/development/usage_ping/dictionary.md b/doc/development/usage_ping/dictionary.md index b7ec3892f1e..1afa727ba36 100644 --- a/doc/development/usage_ping/dictionary.md +++ b/doc/development/usage_ping/dictionary.md @@ -288,87 +288,87 @@ Tiers: `free`, `premium`, `ultimate` ### `compliance_unique_visits.a_compliance_audit_events_api` -Missing description +Unique users that have used the Audit Events API. -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183912_a_compliance_audit_events_api.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183912_a_compliance_audit_events_api.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `compliance_unique_visits.compliance_unique_visits_for_any_target` -Missing description +Number of unique visits to any compliance page -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183914_compliance_unique_visits_for_any_target.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183914_compliance_unique_visits_for_any_target.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `compliance_unique_visits.compliance_unique_visits_for_any_target_monthly` -Missing description +Number of unique visits to any compliance page over a given month -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183916_compliance_unique_visits_for_any_target_monthly.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183916_compliance_unique_visits_for_any_target_monthly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `compliance_unique_visits.g_compliance_audit_events` -Missing description +Unique users who have viewed audit events -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183906_g_compliance_audit_events.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183906_g_compliance_audit_events.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `compliance_unique_visits.g_compliance_dashboard` -Missing description +Number of unique visitors to the compliance dashboard. -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183904_g_compliance_dashboard.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183904_g_compliance_dashboard.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `compliance_unique_visits.i_compliance_audit_events` -Missing description +Unique users that have viewed the instance-level audit events screen -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183908_i_compliance_audit_events.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183908_i_compliance_audit_events.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `compliance_unique_visits.i_compliance_credential_inventory` -Missing description +Unique users who have viewed the credential inventory -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183910_i_compliance_credential_inventory.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183910_i_compliance_credential_inventory.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `ultimate` ### `container_registry_enabled` @@ -6600,15 +6600,15 @@ Tiers: `free`, `premium`, `ultimate` ### `counts_monthly.aggregated_metrics.compliance_features_track_unique_visits_union` -Missing description +Unique users that have used audit event screen, audit event API, compliance dashboard, or credential inventory -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183201_compliance_features_track_unique_visits_union.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183201_compliance_features_track_unique_visits_union.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `counts_monthly.aggregated_metrics.i_testing_paid_monthly_active_user_total` @@ -6816,15 +6816,15 @@ Tiers: `free`, `premium`, `ultimate` ### `counts_weekly.aggregated_metrics.compliance_features_track_unique_visits_union` -Missing description +Unique users that have used audit event screen, audit event API, compliance dashboard, or credential inventory [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183211_compliance_features_track_unique_visits_union.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: +Tiers: `premium`, `ultimate` ### `counts_weekly.aggregated_metrics.i_testing_paid_monthly_active_user_total` @@ -9936,147 +9936,147 @@ Tiers: `free`, `premium`, `ultimate` ### `redis_hll_counters.compliance.a_compliance_audit_events_api_monthly` -Missing description +Unique users that have used the Audit Events API in a given month. -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183942_a_compliance_audit_events_api_monthly.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183942_a_compliance_audit_events_api_monthly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.a_compliance_audit_events_api_weekly` -Missing description +Unique users that have used the Audit Events API in a given week. [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183940_a_compliance_audit_events_api_weekly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.compliance_total_unique_counts_monthly` -Missing description +Unique count of compliance actions in a given month -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183946_compliance_total_unique_counts_monthly.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183946_compliance_total_unique_counts_monthly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.compliance_total_unique_counts_weekly` -Missing description +Unique count of compliance actions in a given week [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183944_compliance_total_unique_counts_weekly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.g_compliance_audit_events_monthly` -Missing description +Unique users who have viewed the audit event screen in a given month. -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183930_g_compliance_audit_events_monthly.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183930_g_compliance_audit_events_monthly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.g_compliance_audit_events_weekly` -Missing description +Number of unique visitors to group-level audit events screen in a given week [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183928_g_compliance_audit_events_weekly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.g_compliance_dashboard_monthly` -Missing description +Unique users who have viewed the compliance dashboard in a given month. -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183926_g_compliance_dashboard_monthly.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183926_g_compliance_dashboard_monthly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.g_compliance_dashboard_weekly` -Missing description +Unique users who have looked at the compliance dashboard in a given week [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183924_g_compliance_dashboard_weekly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.i_compliance_audit_events_monthly` -Missing description +Unique users that have viewed the instance-level audit events screen -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183934_i_compliance_audit_events_monthly.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183934_i_compliance_audit_events_monthly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.i_compliance_audit_events_weekly` -Missing description +Unique users that have viewed the instance-level audit events screen [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183932_i_compliance_audit_events_weekly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: +Tiers: `premium`, `ultimate` ### `redis_hll_counters.compliance.i_compliance_credential_inventory_monthly` -Missing description +Unique users who have viewed the credential inventory in a given month. -[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183938_i_compliance_credential_inventory_monthly.yml) +[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183938_i_compliance_credential_inventory_monthly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: `free` +Tiers: `ultimate` ### `redis_hll_counters.compliance.i_compliance_credential_inventory_weekly` -Missing description +Unique visitors to the credential inventory screen in a given week [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216183936_i_compliance_credential_inventory_weekly.yml) -Group: `` +Group: `group::compliance` Status: `data_available` -Tiers: +Tiers: `ultimate` ### `redis_hll_counters.deploy_token_packages.deploy_token_packages_total_unique_counts_monthly` diff --git a/doc/user/project/merge_requests/reviews/suggestions.md b/doc/user/project/merge_requests/reviews/suggestions.md index 9409cc569a6..0cc5ae9f00b 100644 --- a/doc/user/project/merge_requests/reviews/suggestions.md +++ b/doc/user/project/merge_requests/reviews/suggestions.md @@ -14,7 +14,7 @@ type: index, reference As a reviewer, you're able to suggest code changes with a Markdown syntax in merge request diff threads. Then, the merge request author (or other users with appropriate [permission](../../../permissions.md)) is able to apply these suggestions with a click, -which generates a commit in the merge request authored by the user that applied them. +which generates a commit in the merge request authored by the user that suggested the changes. 1. Choose a line of code to be changed, add a new comment, then select the **Insert suggestion** icon in the toolbar: diff --git a/doc/user/project/repository/repository_mirroring.md b/doc/user/project/repository/repository_mirroring.md index e9f214f08ce..a251f9751e4 100644 --- a/doc/user/project/repository/repository_mirroring.md +++ b/doc/user/project/repository/repository_mirroring.md @@ -594,3 +594,25 @@ When upgrading to GitLab 11.11.8 or newer, a change in how usernames are represe As the error indicates, the connection is getting blocked between GitLab and the remote repository. Even if a [TCP Check](../../../administration/raketasks/maintenance.md#check-tcp-connectivity-to-a-remote-site) is successful, you must check any networking components in the route from GitLab to the remote Server to ensure there's no blockage. For example, we've seen this error when a Firewall was performing a `Deep SSH Inspection` on outgoing packets. + +### Could not read username: terminal prompts disabled + +If you receive this error after creating a new project using +[GitLab CI/CD for external repositories](../../../ci/ci_cd_for_external_repos/): + +```plaintext +"2:fetch remote: "fatal: could not read Username for 'https://bitbucket.org': terminal prompts disabled\n": exit status 128." +``` + +Check if the repository owner is specified in the URL of your mirrored repository: + +1. Go to your project. +1. In the left sidebar, select **Settings > Repository**. +1. Select **Mirroring repositories**. +1. If no repository owner is specified, delete and add the URL again in this format: + + ```plaintext + https://**<repo_owner>**@bitbucket.org/<accountname>/<reponame>.git + ``` + +The repository owner is needed for Bitbucket to connect to the repository for mirroring. diff --git a/spec/helpers/ci/pipeline_editor_helper_spec.rb b/spec/helpers/ci/pipeline_editor_helper_spec.rb index 1e0489bddfe..feb654a091a 100644 --- a/spec/helpers/ci/pipeline_editor_helper_spec.rb +++ b/spec/helpers/ci/pipeline_editor_helper_spec.rb @@ -43,7 +43,7 @@ RSpec.describe Ci::PipelineEditorHelper do "ci-examples-help-page-path" => help_page_path('ci/examples/index'), "ci-help-page-path" => help_page_path('ci/index'), "commit-sha" => project.commit.sha, - "default-branch" => project.default_branch, + "default-branch" => project.default_branch_or_main, "empty-state-illustration-path" => 'foo', "initial-branch-name": nil, "lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'), @@ -70,7 +70,7 @@ RSpec.describe Ci::PipelineEditorHelper do "ci-examples-help-page-path" => help_page_path('ci/examples/index'), "ci-help-page-path" => help_page_path('ci/index'), "commit-sha" => '', - "default-branch" => project.default_branch, + "default-branch" => project.default_branch_or_main, "empty-state-illustration-path" => 'foo', "initial-branch-name": nil, "lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'), diff --git a/spec/policies/release_policy_spec.rb b/spec/policies/release_policy_spec.rb new file mode 100644 index 00000000000..25468ae2ea2 --- /dev/null +++ b/spec/policies/release_policy_spec.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe ReleasePolicy, :request_store do + let_it_be(:developer) { create(:user) } + let_it_be(:maintainer) { create(:user) } + let_it_be(:project) { create(:project, :repository) } + let_it_be(:release, reload: true) { create(:release, project: project) } + + let(:user) { developer } + + before_all do + project.add_developer(developer) + project.add_maintainer(maintainer) + end + + subject { described_class.new(user, release) } + + context 'when the evalute_protected_tag_for_release_permissions feature flag is disabled' do + before do + stub_feature_flags(evalute_protected_tag_for_release_permissions: false) + end + + it 'allows the user to create and update a release' do + is_expected.to be_allowed(:create_release) + is_expected.to be_allowed(:update_release) + end + + it 'prevents the user from destroying a release' do + is_expected.to be_disallowed(:destroy_release) + end + + context 'when the user is maintainer' do + let(:user) { maintainer } + + it 'allows the user to destroy a release' do + is_expected.to be_allowed(:destroy_release) + end + end + end + + context 'when the user has access to the protected tag' do + let_it_be(:protected_tag) { create(:protected_tag, :developers_can_create, name: release.tag, project: project) } + + it 'allows the user to create, update and destroy a release' do + is_expected.to be_allowed(:create_release) + is_expected.to be_allowed(:update_release) + is_expected.to be_allowed(:destroy_release) + end + end + + context 'when the user does not have access to the protected tag' do + let_it_be(:protected_tag) { create(:protected_tag, :maintainers_can_create, name: release.tag, project: project) } + + it 'prevents the user from creating, updating and destroying a release' do + is_expected.to be_disallowed(:create_release) + is_expected.to be_disallowed(:update_release) + is_expected.to be_disallowed(:destroy_release) + end + end +end |