diff --git a/app/views/abuse_reports/new.html.haml b/app/views/abuse_reports/new.html.haml index 09b16c54700..78fa16c13a5 100644 --- a/app/views/abuse_reports/new.html.haml +++ b/app/views/abuse_reports/new.html.haml @@ -25,4 +25,4 @@ = _("Explain the problem. If appropriate, provide a link to the relevant issue or comment.") .form-actions - = f.submit _("Send report"), class: "gl-button btn btn-success" + = f.submit _("Send report"), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 40393f0db99..b3ed8369263 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -87,8 +87,8 @@ .form-actions - if @user.new_record? - = f.submit 'Create user', class: "btn gl-button btn-success" - = link_to 'Cancel', admin_users_path, class: "gl-button btn btn-cancel" + = f.submit 'Create user', class: "btn gl-button btn-confirm" + = link_to 'Cancel', admin_users_path, class: "gl-button btn btn-default btn-cancel" - else - = f.submit 'Save changes', class: "btn gl-button btn-success" - = link_to 'Cancel', admin_user_path(@user), class: "btn gl-button btn-cancel" + = f.submit 'Save changes', class: "btn gl-button btn-confirm" + = link_to 'Cancel', admin_user_path(@user), class: "gl-button btn btn-default btn-cancel" diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index 57edb9abe90..c79b2e978f2 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -43,7 +43,7 @@ .nav-controls = render_if_exists 'admin/users/admin_email_users' = render_if_exists 'admin/users/admin_export_user_permissions' - = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-success btn-search float-right' + = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-confirm btn-search float-right' .filtered-search-block.row-content-block.border-top-0 = form_tag admin_users_path, method: :get do diff --git a/app/views/notify/closed_merge_request_email.text.haml b/app/views/notify/closed_merge_request_email.text.haml index 8546da2d7f0..28766f861d9 100644 --- a/app/views/notify/closed_merge_request_email.text.haml +++ b/app/views/notify/closed_merge_request_email.text.haml @@ -6,3 +6,4 @@ Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @m Author: #{sanitize_name(@merge_request.author_name)} = assignees_label(@merge_request) += reviewers_label(@merge_request) diff --git a/changelogs/unreleased/300750-add-missing-reviewers-information-to-closed-merge-request-email.yml b/changelogs/unreleased/300750-add-missing-reviewers-information-to-closed-merge-request-email.yml new file mode 100644 index 00000000000..814b4280ed2 --- /dev/null +++ b/changelogs/unreleased/300750-add-missing-reviewers-information-to-closed-merge-request-email.yml @@ -0,0 +1,5 @@ +--- +title: Add reviewers detail to text version of closed merge request email +merge_request: 55594 +author: +type: added diff --git a/changelogs/unreleased/btn-confirm-abuse-reports.yml b/changelogs/unreleased/btn-confirm-abuse-reports.yml new file mode 100644 index 00000000000..8bda61fdc62 --- /dev/null +++ b/changelogs/unreleased/btn-confirm-abuse-reports.yml @@ -0,0 +1,5 @@ +--- +title: Move to btn-confirm from btn-success in abuse_reports folder +merge_request: 55262 +author: Yogi (@yo) +type: changed diff --git a/changelogs/unreleased/btn-confirm-admin-users.yml b/changelogs/unreleased/btn-confirm-admin-users.yml new file mode 100644 index 00000000000..cafd375323f --- /dev/null +++ b/changelogs/unreleased/btn-confirm-admin-users.yml @@ -0,0 +1,5 @@ +--- +title: Move to btn-confirm from btn-success in admin/users directory +merge_request: 55276 +author: Yogi (@yo) +type: changed diff --git a/changelogs/unreleased/pks-checks-skip-integrity-lfs-deletions.yml b/changelogs/unreleased/pks-checks-skip-integrity-lfs-deletions.yml new file mode 100644 index 00000000000..ffbc6cff4c3 --- /dev/null +++ b/changelogs/unreleased/pks-checks-skip-integrity-lfs-deletions.yml @@ -0,0 +1,5 @@ +--- +title: 'checks: Skip LFS checks when deleting refs' +merge_request: 55609 +author: +type: fixed diff --git a/doc/administration/gitaly/img/gitaly_network_13_9.png b/doc/administration/gitaly/img/gitaly_network_13_9.png new file mode 100644 index 00000000000..d7dbfdaf0d0 Binary files /dev/null and b/doc/administration/gitaly/img/gitaly_network_13_9.png differ diff --git a/doc/administration/gitaly/index.md b/doc/administration/gitaly/index.md index c442fd6cda2..c2103823815 100644 --- a/doc/administration/gitaly/index.md +++ b/doc/administration/gitaly/index.md @@ -126,6 +126,11 @@ The following list depicts the network architecture of Gitaly: - Authentication is done through a static token which is shared among the Gitaly and GitLab Rails nodes. +The following digraph illustrates communication between Gitaly servers and GitLab Rails showing +the default ports for HTTP and HTTPs communication. + +![Gitaly network architecture diagram](img/gitaly_network_13_9.png) + WARNING: Gitaly servers must not be exposed to the public internet as Gitaly's network traffic is unencrypted by default. The use of firewall is highly recommended to restrict access to the Gitaly server. diff --git a/doc/user/application_security/vulnerability_report/index.md b/doc/user/application_security/vulnerability_report/index.md index 292f99dfc10..b1435543101 100644 --- a/doc/user/application_security/vulnerability_report/index.md +++ b/doc/user/application_security/vulnerability_report/index.md @@ -74,7 +74,8 @@ the **Failed jobs** tab of the pipeline page. ## Export vulnerabilities -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213014) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.10. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213014) in the Security Center (previously known as the Instance Security Dashboard) and project-level Vulnerability Report (previously known as the Project Security Dashboard) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.0. +> - [Added](https://gitlab.com/gitlab-org/gitlab/-/issues/213013) to the group-level Vulnerability Report in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.1. You can export all your vulnerabilities in CSV (comma separated values) format by clicking the **{upload}** **Export** button located at top right of the Security Dashboard. When the report is diff --git a/lib/gitlab/checks/lfs_check.rb b/lib/gitlab/checks/lfs_check.rb index b70a6a69b93..38f0b82c8b4 100644 --- a/lib/gitlab/checks/lfs_check.rb +++ b/lib/gitlab/checks/lfs_check.rb @@ -13,6 +13,7 @@ module Gitlab return unless project.lfs_enabled? return if skip_lfs_integrity_check + return if deletion? logger.log_timed(LOG_MESSAGE) do lfs_check = Checks::LfsIntegrity.new(project, newrev, logger.time_left) diff --git a/spec/lib/gitlab/checks/lfs_check_spec.rb b/spec/lib/gitlab/checks/lfs_check_spec.rb index 713858e0e35..19c1d820dff 100644 --- a/spec/lib/gitlab/checks/lfs_check_spec.rb +++ b/spec/lib/gitlab/checks/lfs_check_spec.rb @@ -39,13 +39,26 @@ RSpec.describe Gitlab::Checks::LfsCheck do end end - context 'deletion' do - let(:changes) { { oldrev: oldrev, ref: ref } } + context 'with deletion' do + shared_examples 'a skipped integrity check' do + it 'skips integrity check' do + expect(project.repository).not_to receive(:new_objects) + expect_any_instance_of(Gitlab::Git::LfsChanges).not_to receive(:new_pointers) - it 'skips integrity check' do - expect(project.repository).not_to receive(:new_objects) + subject.validate! + end + end - subject.validate! + context 'with missing newrev' do + it_behaves_like 'a skipped integrity check' do + let(:changes) { { oldrev: oldrev, ref: ref } } + end + end + + context 'with blank newrev' do + it_behaves_like 'a skipped integrity check' do + let(:changes) { { oldrev: oldrev, newrev: Gitlab::Git::BLANK_SHA, ref: ref } } + end end end diff --git a/spec/mailers/emails/merge_requests_spec.rb b/spec/mailers/emails/merge_requests_spec.rb index 1a61d3c4362..d127867aa82 100644 --- a/spec/mailers/emails/merge_requests_spec.rb +++ b/spec/mailers/emails/merge_requests_spec.rb @@ -8,7 +8,7 @@ RSpec.describe Emails::MergeRequests do include_context 'gitlab email notification' - let_it_be(:current_user) { create(:user) } + let_it_be(:current_user, reload: true) { create(:user, email: "current@email.com", name: 'www.example.com') } let_it_be(:assignee, reload: true) { create(:user, email: 'assignee@example.com', name: 'John Doe') } let_it_be(:reviewer, reload: true) { create(:user, email: 'reviewer@example.com', name: 'Jane Doe') } let_it_be(:project) { create(:project, :repository) } @@ -22,6 +22,39 @@ RSpec.describe Emails::MergeRequests do end let(:recipient) { assignee } + let(:current_user_sanitized) { 'www_example_com' } + + describe '#closed_merge_request_email' do + subject { Notify.closed_merge_request_email(recipient.id, merge_request.id, current_user.id) } + + it_behaves_like 'an answer to an existing thread with reply-by-email enabled' do + let(:model) { merge_request } + end + + it_behaves_like 'it should show Gmail Actions View Merge request link' + it_behaves_like 'an unsubscribeable thread' + it_behaves_like 'appearance header and footer enabled' + it_behaves_like 'appearance header and footer not enabled' + + it 'is sent as the author' do + sender = subject.header[:from].addrs[0] + expect(sender.display_name).to eq(current_user.name) + expect(sender.address).to eq(gitlab_sender) + end + + it 'has the correct subject and body' do + aggregate_failures do + is_expected.to have_referable_subject(merge_request, reply: true) + is_expected.to have_body_text('closed') + is_expected.to have_body_text(current_user_sanitized) + is_expected.to have_body_text(project_merge_request_path(project, merge_request)) + is_expected.to have_link(merge_request.to_reference, href: project_merge_request_url(merge_request.target_project, merge_request)) + + expect(subject.text_part).to have_content(assignee.name) + expect(subject.text_part).to have_content(reviewer.name) + end + end + end describe '#merged_merge_request_email' do let(:merge_author) { assignee } @@ -79,7 +112,7 @@ RSpec.describe Emails::MergeRequests do subject { Notify.resolved_all_discussions_email(recipient.id, merge_request.id, current_user.id) } it "includes the name of the resolver" do - expect(subject).to have_body_text current_user.name + expect(subject).to have_body_text current_user_sanitized end end