From 5343536f2bb402bc767db2d015e45ac87189d7c3 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 26 Nov 2021 12:12:49 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .rubocop_manual_todo.yml | 4 - .../components/blob_button_group.vue | 5 ++ .../components/blob_content_viewer.vue | 2 + .../components/delete_blob_modal.vue | 13 ++- .../queries/blob_info.query.graphql | 1 + .../projects/settings/ci_cd_controller.rb | 1 - app/finders/ci/auth_job_finder.rb | 2 +- app/graphql/types/repository/blob_type.rb | 3 + app/models/namespace.rb | 2 +- app/presenters/blob_presenter.rb | 6 ++ .../projects/settings/ci_cd/show.html.haml | 23 +++--- .../development/ci_scoped_job_token.yml | 8 -- .../keyset_pagination_for_groups_api.yml | 8 -- .../validate_namespace_parent_type.yml | 8 -- ...migration_of_requirements_to_work_items.rb | 17 ++++ db/schema_migrations/20211122193948 | 1 + doc/administration/gitaly/praefect.md | 5 +- doc/api/graphql/reference/index.md | 1 + doc/ci/jobs/ci_job_token.md | 6 +- .../database/multiple_databases.md | 59 +++++++++++++- doc/integration/recaptcha.md | 21 ++--- doc/topics/plan_and_track.md | 3 + doc/user/application_security/dast/index.md | 21 ----- doc/user/crm/crm_contacts_v14_6.png | Bin 0 -> 11613 bytes doc/user/crm/crm_organizations_v14_6.png | Bin 0 -> 8244 bytes doc/user/crm/index.md | 77 ++++++++++++++++++ doc/user/crm/issue_crm_contacts_v14_6.png | Bin 0 -> 6703 bytes doc/user/group/index.md | 10 +-- doc/user/group/iterations/index.md | 34 +------- doc/user/project/quick_actions.md | 14 ++-- lib/api/groups.rb | 2 +- lib/gitlab/checks/branch_check.rb | 1 + spec/bin/feature_flag_spec.rb | 4 +- spec/factories/namespaces.rb | 6 +- spec/features/groups/navbar_spec.rb | 1 - spec/finders/ci/auth_job_finder_spec.rb | 11 --- .../components/blob_button_group_spec.js | 1 + .../components/delete_blob_modal_spec.js | 26 +++--- spec/frontend/repository/mock_data.js | 1 + .../mutations/merge_requests/create_spec.rb | 5 +- spec/graphql/types/range_input_type_spec.rb | 2 +- .../types/repository/blob_type_spec.rb | 1 + spec/lib/gitlab/checks/branch_check_spec.rb | 9 ++ .../keyset/connection_generic_keyset_spec.rb | 2 +- spec/models/group_spec.rb | 28 ------- .../namespace/traversal_hierarchy_spec.rb | 2 +- spec/models/namespace_spec.rb | 28 ------- spec/presenters/blob_presenter_spec.rb | 22 +++++ spec/requests/api/groups_spec.rb | 30 ------- .../navbar_structure_context.rb | 3 +- .../api/pypi_packages_shared_examples.rb | 3 +- 51 files changed, 290 insertions(+), 253 deletions(-) delete mode 100644 config/feature_flags/development/ci_scoped_job_token.yml delete mode 100644 config/feature_flags/development/keyset_pagination_for_groups_api.yml delete mode 100644 config/feature_flags/development/validate_namespace_parent_type.yml create mode 100644 db/post_migrate/20211122193948_cleanup_background_migration_of_requirements_to_work_items.rb create mode 100644 db/schema_migrations/20211122193948 create mode 100644 doc/user/crm/crm_contacts_v14_6.png create mode 100644 doc/user/crm/crm_organizations_v14_6.png create mode 100644 doc/user/crm/index.md create mode 100644 doc/user/crm/issue_crm_contacts_v14_6.png diff --git a/.rubocop_manual_todo.yml b/.rubocop_manual_todo.yml index f47e76b858d..73fbbcb3909 100644 --- a/.rubocop_manual_todo.yml +++ b/.rubocop_manual_todo.yml @@ -2562,7 +2562,6 @@ Style/OpenStructUse: - 'lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb' - 'lib/gitlab/testing/request_inspector_middleware.rb' - 'lib/mattermost/session.rb' - - 'spec/bin/feature_flag_spec.rb' - 'spec/controllers/admin/clusters_controller_spec.rb' - 'spec/controllers/groups/clusters_controller_spec.rb' - 'spec/controllers/import/fogbugz_controller_spec.rb' @@ -2580,8 +2579,6 @@ Style/OpenStructUse: - 'spec/graphql/mutations/clusters/agents/delete_spec.rb' - 'spec/graphql/mutations/commits/create_spec.rb' - 'spec/graphql/mutations/merge_requests/accept_spec.rb' - - 'spec/graphql/mutations/merge_requests/create_spec.rb' - - 'spec/graphql/types/range_input_type_spec.rb' - 'spec/helpers/application_settings_helper_spec.rb' - 'spec/helpers/profiles_helper_spec.rb' - 'spec/initializers/doorkeeper_spec.rb' @@ -2590,7 +2587,6 @@ Style/OpenStructUse: - 'spec/lib/gitlab/database/migrations/runner_spec.rb' - 'spec/lib/gitlab/gitaly_client/blobs_stitcher_spec.rb' - 'spec/lib/gitlab/gitaly_client/diff_stitcher_spec.rb' - - 'spec/lib/gitlab/graphql/pagination/keyset/connection_generic_keyset_spec.rb' - 'spec/lib/gitlab/graphql/pagination/keyset/connection_spec.rb' - 'spec/lib/gitlab/legacy_github_import/project_creator_spec.rb' - 'spec/lib/gitlab/quick_actions/command_definition_spec.rb' diff --git a/app/assets/javascripts/repository/components/blob_button_group.vue b/app/assets/javascripts/repository/components/blob_button_group.vue index e2ba5cea6cc..de6156d48dc 100644 --- a/app/assets/javascripts/repository/components/blob_button_group.vue +++ b/app/assets/javascripts/repository/components/blob_button_group.vue @@ -53,6 +53,10 @@ export default { type: Boolean, required: true, }, + canPushToBranch: { + type: Boolean, + required: true, + }, emptyRepo: { type: Boolean, required: true, @@ -126,6 +130,7 @@ export default { :target-branch="targetBranch || ref" :original-branch="originalBranch || ref" :can-push-code="canPushCode" + :can-push-to-branch="canPushToBranch" :empty-repo="emptyRepo" /> diff --git a/app/assets/javascripts/repository/components/blob_content_viewer.vue b/app/assets/javascripts/repository/components/blob_content_viewer.vue index 2cc5a8a79d2..cea95645fa4 100644 --- a/app/assets/javascripts/repository/components/blob_content_viewer.vue +++ b/app/assets/javascripts/repository/components/blob_content_viewer.vue @@ -106,6 +106,7 @@ export default { ideForkAndEditPath: '', storedExternally: false, canModifyBlob: false, + canCurrentUserPushToBranch: false, rawPath: '', externalStorageUrl: '', replacePath: '', @@ -266,6 +267,7 @@ export default { :replace-path="blobInfo.replacePath" :delete-path="blobInfo.webPath" :can-push-code="project.userPermissions.pushCode" + :can-push-to-branch="blobInfo.canCurrentUserPushToBranch" :empty-repo="project.repository.empty" :project-path="projectPath" :is-locked="isLocked" diff --git a/app/assets/javascripts/repository/components/delete_blob_modal.vue b/app/assets/javascripts/repository/components/delete_blob_modal.vue index e15f9b01c62..0d3dc06c2c8 100644 --- a/app/assets/javascripts/repository/components/delete_blob_modal.vue +++ b/app/assets/javascripts/repository/components/delete_blob_modal.vue @@ -71,6 +71,10 @@ export default { type: Boolean, required: true, }, + canPushToBranch: { + type: Boolean, + required: true, + }, emptyRepo: { type: Boolean, required: true, @@ -176,9 +180,12 @@ export default {