mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-25 16:03:48 +00:00
Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
@ -3056,7 +3056,6 @@ RSpec/FeatureCategory:
|
||||
- 'spec/models/clusters/providers/gcp_spec.rb'
|
||||
- 'spec/models/commit_range_spec.rb'
|
||||
- 'spec/models/commit_signatures/gpg_signature_spec.rb'
|
||||
- 'spec/models/commit_signatures/x509_commit_signature_spec.rb'
|
||||
- 'spec/models/concerns/access_requestable_spec.rb'
|
||||
- 'spec/models/concerns/after_commit_queue_spec.rb'
|
||||
- 'spec/models/concerns/approvable_spec.rb'
|
||||
|
@ -15,8 +15,7 @@ const issuableData = issuableInitialDataById('js-issuable-app');
|
||||
|
||||
if (
|
||||
!isLegacyIssueType(issuableData) &&
|
||||
(gon.features.workItemViewForIssues ||
|
||||
(gon.features.workItemsViewPreference && gon.current_user_use_work_items_view))
|
||||
(gon.features.workItemViewForIssues || gon.current_user_use_work_items_view)
|
||||
) {
|
||||
initWorkItemPage();
|
||||
} else {
|
||||
|
@ -1,9 +0,0 @@
|
||||
// content-visibility was fixed in Chrome 138, older versions are way too laggy with is so we just disable the feature
|
||||
// https://issues.chromium.org/issues/40066846
|
||||
export const disableContentVisibilityOnOlderChrome = (root) => {
|
||||
if (!/Chrome/.test(navigator.userAgent)) return;
|
||||
const chromeVersion = parseInt(navigator.userAgent.match(/Chrome\/(\d+)/)[1], 10);
|
||||
if (chromeVersion < 138) {
|
||||
root.style.setProperty('--rd-content-visibility-auto', 'visible');
|
||||
}
|
||||
};
|
@ -0,0 +1,19 @@
|
||||
// content-visibility: auto is very laggy pre Chrome 138
|
||||
// https://issues.chromium.org/issues/40066846
|
||||
// text inside content-visibility: auto is not searchable in Safari pre 18.6
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=283846
|
||||
export const disableBrokenContentVisibility = (root) => {
|
||||
if (/Chrome/.test(navigator.userAgent)) {
|
||||
const chromeVersion = parseInt(navigator.userAgent.match(/Chrome\/(\d+)/)[1], 10);
|
||||
if (chromeVersion < 138) {
|
||||
root.style.setProperty('--rd-content-visibility-auto', 'visible');
|
||||
}
|
||||
} else if (/Safari/.test(navigator.userAgent)) {
|
||||
const [, safariMajor, safariMinor] = (
|
||||
navigator.userAgent.match(/\/(\d+)\.(\d+) Safari/) || []
|
||||
).map((num) => parseInt(num, 10));
|
||||
if (safariMajor <= 18 && safariMinor <= 5) {
|
||||
root.style.setProperty('--rd-content-visibility-auto', 'visible');
|
||||
}
|
||||
}
|
||||
};
|
@ -13,7 +13,7 @@ import { fixWebComponentsStreamingOnSafari } from '~/rapid_diffs/app/safari_fix'
|
||||
import { DIFF_FILE_MOUNTED } from '~/rapid_diffs/dom_events';
|
||||
import { VIEWER_ADAPTERS } from '~/rapid_diffs/adapters';
|
||||
import { camelizeKeys } from '~/lib/utils/object_utils';
|
||||
import { disableContentVisibilityOnOlderChrome } from '~/rapid_diffs/app/chrome_fix';
|
||||
import { disableBrokenContentVisibility } from '~/rapid_diffs/app/content_visibility_fix';
|
||||
|
||||
// This facade interface joins together all the bits and pieces of Rapid Diffs: DiffFile, Settings, File browser, etc.
|
||||
// It's a unified entrypoint for Rapid Diffs and all external communications should happen through this interface.
|
||||
@ -86,7 +86,11 @@ export class RapidDiffsFacade {
|
||||
window.customElements.define('diff-file', this.#DiffFileImplementation);
|
||||
window.customElements.define('diff-file-mounted', this.#DiffFileMounted);
|
||||
window.customElements.define('streaming-error', StreamingError);
|
||||
fixWebComponentsStreamingOnSafari(this.root, this.#DiffFileImplementation);
|
||||
fixWebComponentsStreamingOnSafari(
|
||||
this.root,
|
||||
this.#DiffFileImplementation,
|
||||
this.#DiffFileMounted,
|
||||
);
|
||||
}
|
||||
|
||||
get #DiffFileMounted() {
|
||||
@ -130,7 +134,7 @@ export class RapidDiffsFacade {
|
||||
}
|
||||
|
||||
#initDiffsList() {
|
||||
disableContentVisibilityOnOlderChrome(this.root);
|
||||
disableBrokenContentVisibility(this.root);
|
||||
initHiddenFilesWarning(this.root.querySelector('[data-hidden-files-warning]'));
|
||||
this.root.addEventListener(DIFF_FILE_MOUNTED, useDiffsList(pinia).addLoadedFile);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { throttle } from 'lodash';
|
||||
|
||||
// Safari doesn't consider custom elements as Web Components when streaming ¯\_(ツ)_/¯
|
||||
export const fixWebComponentsStreamingOnSafari = (elementToObserve, DiffFileImplementation) => {
|
||||
export const fixWebComponentsStreamingOnSafari = (elementToObserve, DiffFile, DiffFileMounted) => {
|
||||
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||
if (!isSafari) return;
|
||||
const observer = new MutationObserver(
|
||||
@ -10,10 +10,11 @@ export const fixWebComponentsStreamingOnSafari = (elementToObserve, DiffFileImpl
|
||||
document.querySelectorAll('diff-file-mounted:not([mounted])').forEach((diffFileMounted) => {
|
||||
diffFileMounted.setAttribute('mounted', 'true');
|
||||
const diffFile = diffFileMounted.parentElement;
|
||||
if (diffFile instanceof DiffFileImplementation) return;
|
||||
Object.setPrototypeOf(diffFile, DiffFileImplementation.prototype);
|
||||
Object.assign(diffFile, new DiffFileImplementation(diffFile));
|
||||
diffFile.mount();
|
||||
if (diffFile instanceof DiffFile) return;
|
||||
Object.setPrototypeOf(diffFile, DiffFile.prototype);
|
||||
Object.setPrototypeOf(diffFileMounted, DiffFileMounted.prototype);
|
||||
Object.assign(diffFile, new DiffFile(diffFile));
|
||||
diffFileMounted.connectedCallback();
|
||||
});
|
||||
},
|
||||
200,
|
||||
|
@ -35,7 +35,8 @@ export class DiffFile extends HTMLElement {
|
||||
const [diffElement] = this.children;
|
||||
this.diffElement = diffElement;
|
||||
this.observeVisibility();
|
||||
this.trigger = this.#trigger.bind(this);
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
this.trigger = this._trigger.bind(this);
|
||||
this.trigger(events.MOUNTED);
|
||||
this.dispatchEvent(new CustomEvent(DIFF_FILE_MOUNTED, { bubbles: true }));
|
||||
}
|
||||
@ -50,7 +51,8 @@ export class DiffFile extends HTMLElement {
|
||||
this.trigger = undefined;
|
||||
}
|
||||
|
||||
#trigger(event, ...args) {
|
||||
// don't use private methods because...Safari
|
||||
_trigger(event, ...args) {
|
||||
if (!eventNames.includes(event))
|
||||
throw new Error(
|
||||
`Missing event declaration: ${event}. Did you forget to declare this in ~/rapid_diffs/events.js?`,
|
||||
|
@ -285,8 +285,7 @@ export default {
|
||||
!this.isIncident &&
|
||||
!this.isServiceDeskIssue &&
|
||||
!this.isTestCase &&
|
||||
(this.glFeatures.workItemViewForIssues ||
|
||||
(this.glFeatures.workItemsViewPreference && gon.current_user_use_work_items_view))
|
||||
(this.glFeatures.workItemViewForIssues || gon.current_user_use_work_items_view)
|
||||
);
|
||||
},
|
||||
hiddenIssuableTitle() {
|
||||
|
@ -228,8 +228,7 @@ export default {
|
||||
issueAsWorkItem() {
|
||||
return Boolean(
|
||||
!this.isGroup &&
|
||||
(this.glFeatures.workItemViewForIssues ||
|
||||
(this.glFeatures.workItemsViewPreference && gon.current_user_use_work_items_view)),
|
||||
(this.glFeatures.workItemViewForIssues || gon.current_user_use_work_items_view),
|
||||
);
|
||||
},
|
||||
canUseRouter() {
|
||||
|
@ -161,8 +161,7 @@ export default {
|
||||
issueAsWorkItem() {
|
||||
return (
|
||||
!this.isGroup &&
|
||||
(this.glFeatures.workItemViewForIssues ||
|
||||
(this.glFeatures.workItemsViewPreference && gon.current_user_use_work_items_view))
|
||||
(this.glFeatures.workItemViewForIssues || gon.current_user_use_work_items_view)
|
||||
);
|
||||
},
|
||||
childItemUniqueId() {
|
||||
|
@ -52,8 +52,7 @@ export default {
|
||||
issueAsWorkItem() {
|
||||
return (
|
||||
!this.isGroup &&
|
||||
(this.glFeatures.workItemViewForIssues ||
|
||||
(this.glFeatures.workItemsViewPreference && gon.current_user_use_work_items_view)) &&
|
||||
(this.glFeatures.workItemViewForIssues || gon.current_user_use_work_items_view) &&
|
||||
this.glFeatures.workItemsAlpha
|
||||
);
|
||||
},
|
||||
|
@ -89,8 +89,7 @@ export default {
|
||||
issueAsWorkItem() {
|
||||
return (
|
||||
!this.isGroup &&
|
||||
(this.glFeatures.workItemViewForIssues ||
|
||||
(this.glFeatures.workItemsViewPreference && gon.current_user_use_work_items_view))
|
||||
(this.glFeatures.workItemViewForIssues || gon.current_user_use_work_items_view)
|
||||
);
|
||||
},
|
||||
getDrawerHeight() {
|
||||
|
@ -72,7 +72,6 @@ class Projects::IssuesController < Projects::ApplicationController
|
||||
|
||||
before_action only: :show do
|
||||
push_frontend_feature_flag(:epic_widget_edit_confirmation, project)
|
||||
push_frontend_feature_flag(:work_items_view_preference, current_user)
|
||||
end
|
||||
|
||||
after_action :log_issue_show, only: :show
|
||||
@ -424,8 +423,7 @@ class Projects::IssuesController < Projects::ApplicationController
|
||||
!issue.from_service_desk? &&
|
||||
!issue.work_item_type&.incident? &&
|
||||
(Feature.enabled?(:work_item_view_for_issues, project&.group) ||
|
||||
(Feature.enabled?(:work_items_view_preference, current_user) &&
|
||||
current_user&.user_preference&.use_work_items_view))
|
||||
current_user&.user_preference&.use_work_items_view)
|
||||
end
|
||||
|
||||
def work_item_redirect_except_actions
|
||||
|
@ -15,9 +15,16 @@ module Repositories
|
||||
urgency :low, [:upload_finalize]
|
||||
|
||||
def download
|
||||
return render_lfs_not_found unless project
|
||||
|
||||
lfs_object = LfsObject.find_by_oid(oid)
|
||||
|
||||
return render_lfs_not_found unless lfs_object&.file&.exists?
|
||||
|
||||
if Feature.enabled?(:validate_lfs_object_access, project) && !lfs_object.project_allowed_access?(project)
|
||||
return render_lfs_not_found
|
||||
end
|
||||
|
||||
send_upload(lfs_object.file, send_params: { content_type: "application/octet-stream" })
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
- use_work_item = Feature.enabled?(:work_item_view_for_issues, @project.group) || (Feature.enabled?(:work_items_view_preference, current_user) && current_user&.user_preference&.use_work_items_view)
|
||||
- use_work_item = Feature.enabled?(:work_item_view_for_issues, @project.group) || current_user&.user_preference&.use_work_items_view
|
||||
- add_page_specific_style 'page_bundles/merge_request'
|
||||
- add_page_specific_style 'page_bundles/labels'
|
||||
- add_page_specific_style 'page_bundles/issuable_list'
|
||||
|
@ -12,6 +12,8 @@ additional_properties:
|
||||
description: predictive test selection strategy
|
||||
value:
|
||||
description: amount of tests selected
|
||||
ci_job_id:
|
||||
description: id of the job pushing the event
|
||||
product_group: development_analytics
|
||||
milestone: '18.1'
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/191286
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
name: work_items_view_preference
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/461855
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/165085
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/482931
|
||||
milestone: '17.4'
|
||||
group: group::project management
|
||||
name: validate_lfs_object_access
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/510292
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/191723
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/547584
|
||||
milestone: '18.1'
|
||||
group: group::source code
|
||||
type: beta
|
||||
default_enabled: true
|
||||
default_enabled: false
|
@ -19,18 +19,11 @@ title: Test a new look for issues
|
||||
- Feature flag named `work_items_view_preference` enabled on GitLab.com in GitLab 17.9 for a subset of users.
|
||||
- Feature flag named `work_items_view_preference` [enabled](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/184496) on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in 17.10.
|
||||
- **New look** toggle [hidden](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/182330) with feature flag named `work_item_view_for_issues`. Flag enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated in 17.11.
|
||||
- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/482931) in GitLab 18.2. Feature flag `work_items_view_preference` removed.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
{{< alert type="flag" >}}
|
||||
|
||||
The availability of this feature is controlled by a feature flag.
|
||||
For more information, see the history.
|
||||
|
||||
{{< /alert >}}
|
||||
|
||||
<!-- When issues as work items are generally available and `work_items_view_preference` flag is removed,
|
||||
incorporate this content into issues/index.md or managing_issues.md and redirect this page there -->
|
||||
<!-- Incorporate this content into issues/index.md or managing_issues.md and redirect this page there -->
|
||||
|
||||
We have changed how issues look by migrating them to a unified framework for work items to better
|
||||
meet the product needs of our Agile Planning offering.
|
||||
@ -72,11 +65,6 @@ The new issues experience includes these improvements:
|
||||
|
||||
When you view the Issues page or issue detail page, you can toggle the new experience.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- The feature flag `work_items_view_preference` must be enabled.
|
||||
- The feature flag `work_item_view_for_issues` must be disabled.
|
||||
|
||||
To toggle the new issue look:
|
||||
|
||||
1. In the upper-right corner look for the **New look** badge.
|
||||
|
@ -517,8 +517,6 @@ of your installation.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
<!-- When issues as work items are GA and feature flag `work_items_view_preference` is removed, remove the prerequisite below. -->
|
||||
|
||||
If an issue description is long, GitLab displays only part of it.
|
||||
To see the whole description, you must select **Read more**.
|
||||
This truncation makes it easier to find other elements on the page without scrolling through lengthy text.
|
||||
@ -542,8 +540,6 @@ This setting is remembered and affects all issues, tasks, epics, objectives, and
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
<!-- When issues as work items are GA and feature flag `work_items_view_preference` is removed, remove the prerequisite below. -->
|
||||
|
||||
Issue attributes are shown in a sidebar to the right of the description when space allows.
|
||||
|
||||
Prerequisites:
|
||||
|
@ -86,7 +86,6 @@ module Gitlab
|
||||
push_frontend_feature_flag(:find_and_replace, current_user)
|
||||
# To be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/399248
|
||||
push_frontend_feature_flag(:remove_monitor_metrics)
|
||||
push_frontend_feature_flag(:work_items_view_preference, current_user)
|
||||
push_frontend_feature_flag(:work_item_view_for_issues)
|
||||
push_frontend_feature_flag(:merge_request_dashboard, current_user, type: :wip)
|
||||
push_frontend_feature_flag(:new_project_creation_form, current_user, type: :wip)
|
||||
|
@ -73,7 +73,7 @@
|
||||
"@mattiasbuelens/web-streams-adapter": "^0.1.0",
|
||||
"@rails/actioncable": "7.1.501",
|
||||
"@rails/ujs": "7.1.501",
|
||||
"@sentry/browser": "9.24.0",
|
||||
"@sentry/browser": "9.27.0",
|
||||
"@snowplow/browser-plugin-client-hints": "^3.24.2",
|
||||
"@snowplow/browser-plugin-form-tracking": "^3.24.2",
|
||||
"@snowplow/browser-plugin-ga-cookies": "^3.24.2",
|
||||
|
@ -5,6 +5,7 @@ require 'spec_helper'
|
||||
RSpec.describe Repositories::LfsStorageController, feature_category: :source_code_management do
|
||||
using RSpec::Parameterized::TableSyntax
|
||||
include GitHttpHelpers
|
||||
include ProjectForksHelper
|
||||
|
||||
let_it_be(:project) { create(:project, :public) }
|
||||
let_it_be(:user) { create(:user) }
|
||||
@ -76,9 +77,9 @@ RSpec.describe Repositories::LfsStorageController, feature_category: :source_cod
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples 'an error response' do |http_status, error_message|
|
||||
shared_examples 'an error response' do |http_status, error_message, http_method, action|
|
||||
it "returns #{http_status} and includes '#{error_message}'" do
|
||||
put :upload_finalize, params: params
|
||||
send(http_method, action, params: params)
|
||||
|
||||
expect(response).to have_gitlab_http_status(http_status)
|
||||
expect(response.body).to include(error_message)
|
||||
@ -113,7 +114,7 @@ RSpec.describe Repositories::LfsStorageController, feature_category: :source_cod
|
||||
context "when #{reason} raised" do
|
||||
let(:service_response) { ServiceResponse.error(reason: reason, message: message) }
|
||||
|
||||
it_behaves_like "an error response", :forbidden, 'Check your access level'
|
||||
it_behaves_like "an error response", :forbidden, 'Check your access level', :put, :upload_finalize
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -121,13 +122,120 @@ RSpec.describe Repositories::LfsStorageController, feature_category: :source_cod
|
||||
context 'when bad_request' do
|
||||
let(:service_response) { ServiceResponse.error(reason: :invalid_uploaded_file, message: 'SHA256 or size mismatch') }
|
||||
|
||||
it_behaves_like "an error response", :bad_request, 'SHA256 or size mismatch'
|
||||
it_behaves_like "an error response", :bad_request, 'SHA256 or size mismatch', :put, :upload_finalize
|
||||
end
|
||||
|
||||
context 'when unprocessable_entity' do
|
||||
let(:service_response) { ServiceResponse.error(reason: :unprocessable_entity, message: 'Unprocessable entity') }
|
||||
|
||||
it_behaves_like "an error response", :unprocessable_entity, 'Unprocessable entity'
|
||||
it_behaves_like "an error response", :unprocessable_entity, 'Unprocessable entity', :put, :upload_finalize
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET #download' do
|
||||
let_it_be(:private_project) { create(:project, :private) }
|
||||
let_it_be(:repository_path) { "#{private_project.full_path}.git" }
|
||||
let_it_be(:lfs_object) { create(:lfs_object, :with_file) }
|
||||
let_it_be(:token) { create(:personal_access_token, user: user, scopes: ['read_repository']) }
|
||||
let_it_be(:extra_headers) { { 'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(user.username, token.token) } }
|
||||
|
||||
before do
|
||||
create(:lfs_objects_project, project: private_project, lfs_object: lfs_object)
|
||||
request.headers.merge!(extra_headers)
|
||||
end
|
||||
|
||||
context 'with permission to download the file' do
|
||||
before do
|
||||
private_project.add_developer(user)
|
||||
end
|
||||
|
||||
context 'when the LFS object exists in the project' do
|
||||
it 'returns the file' do
|
||||
get :download, params: { repository_path: repository_path, oid: lfs_object.oid }
|
||||
|
||||
expect(response).to have_gitlab_http_status(:ok)
|
||||
expect(response.body).to eq lfs_object.file.read
|
||||
end
|
||||
|
||||
context 'when the LFS object metadata exists but file is missing' do
|
||||
let_it_be(:broken_lfs_object) { create(:lfs_object) }
|
||||
let(:params) { { repository_path: repository_path, oid: broken_lfs_object.oid } }
|
||||
|
||||
before do
|
||||
create(:lfs_objects_project, project: private_project, lfs_object: broken_lfs_object)
|
||||
broken_lfs_object.update_column(:file, nil)
|
||||
end
|
||||
|
||||
it_behaves_like "an error response", :not_found, 'Not found', :get, :download
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the LFS doesn not exist in the project' do
|
||||
let_it_be(:other_lfs_object) { create(:lfs_object, :with_file) }
|
||||
let(:params) { { repository_path: repository_path, oid: other_lfs_object.oid } }
|
||||
|
||||
it_behaves_like "an error response", :not_found, 'Not found', :get, :download
|
||||
end
|
||||
end
|
||||
|
||||
# When an user doesn't have download access permission,
|
||||
# it returns a 404 to avoid exposing the existence of the container.
|
||||
# Refer to LfsRequet#lfs_check_access!
|
||||
context 'without permission' do
|
||||
let(:params) { { repository_path: repository_path, oid: lfs_object.oid } }
|
||||
|
||||
before do
|
||||
private_project.add_guest(user)
|
||||
end
|
||||
|
||||
it_behaves_like "an error response", :not_found, 'Not found', :get, :download
|
||||
end
|
||||
|
||||
context 'with fork network access' do
|
||||
let_it_be(:original_project) { create(:project, :public) }
|
||||
let_it_be(:forked_project) { fork_project(original_project, user, repository: true) }
|
||||
let_it_be(:fork_repository_path) { "#{forked_project.full_path}.git" }
|
||||
let_it_be(:original_lfs_object) { create(:lfs_object, :with_file) }
|
||||
|
||||
before do
|
||||
forked_project.add_developer(user)
|
||||
request.headers.merge!(extra_headers)
|
||||
end
|
||||
|
||||
context 'when the LFS object is linked to the original project' do
|
||||
before do
|
||||
create(:lfs_objects_project, project: original_project, lfs_object: original_lfs_object)
|
||||
end
|
||||
|
||||
it 'allows access to LFS object from original project through fork' do
|
||||
get :download, params: { repository_path: fork_repository_path, oid: original_lfs_object.oid }
|
||||
|
||||
expect(response).to have_gitlab_http_status(:ok)
|
||||
expect(response.body).to eq original_lfs_object.file.read
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the LFS object is not linked to the original project' do
|
||||
let(:params) { { repository_path: fork_repository_path, oid: original_lfs_object.oid } }
|
||||
|
||||
it_behaves_like "an error response", :not_found, 'Not found', :get, :download
|
||||
end
|
||||
end
|
||||
|
||||
context 'when validate_lfs_object_access FF is disabled' do
|
||||
let_it_be(:unrelated_lfs_object) { create(:lfs_object, :with_file) }
|
||||
|
||||
before do
|
||||
private_project.add_developer(user)
|
||||
stub_feature_flags(validate_lfs_object_access: false)
|
||||
end
|
||||
|
||||
it 'returns the file' do
|
||||
get :download, params: { repository_path: repository_path, oid: lfs_object.oid }
|
||||
|
||||
expect(response).to have_gitlab_http_status(:ok)
|
||||
expect(response.body).to eq lfs_object.file.read
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -11,8 +11,8 @@ import { StreamingError } from '~/rapid_diffs/streaming_error';
|
||||
import { useDiffsView } from '~/rapid_diffs/stores/diffs_view';
|
||||
import { fixWebComponentsStreamingOnSafari } from '~/rapid_diffs/app/safari_fix';
|
||||
import { DIFF_FILE_MOUNTED } from '~/rapid_diffs/dom_events';
|
||||
import { disableContentVisibilityOnOlderChrome } from '~/rapid_diffs/app/chrome_fix';
|
||||
import { useMockIntersectionObserver } from 'helpers/mock_dom_observer';
|
||||
import { disableBrokenContentVisibility } from '~/rapid_diffs/app/content_visibility_fix';
|
||||
|
||||
jest.mock('~/lib/graphql');
|
||||
jest.mock('~/awards_handler');
|
||||
@ -21,7 +21,7 @@ jest.mock('~/rapid_diffs/app/view_settings');
|
||||
jest.mock('~/rapid_diffs/app/init_hidden_files_warning');
|
||||
jest.mock('~/rapid_diffs/app/init_file_browser');
|
||||
jest.mock('~/rapid_diffs/app/safari_fix');
|
||||
jest.mock('~/rapid_diffs/app/chrome_fix');
|
||||
jest.mock('~/rapid_diffs/app/content_visibility_fix');
|
||||
|
||||
describe('Rapid Diffs App', () => {
|
||||
const { trigger } = useMockIntersectionObserver();
|
||||
@ -90,7 +90,7 @@ describe('Rapid Diffs App', () => {
|
||||
expect(window.customElements.define).toHaveBeenCalledWith('streaming-error', StreamingError);
|
||||
expect(initHiddenFilesWarning).toHaveBeenCalledWith(getHiddenFilesWarningTarget());
|
||||
expect(fixWebComponentsStreamingOnSafari).toHaveBeenCalled();
|
||||
expect(disableContentVisibilityOnOlderChrome).toHaveBeenCalled();
|
||||
expect(disableBrokenContentVisibility).toHaveBeenCalled();
|
||||
expect(initFileBrowser).toHaveBeenCalledWith({
|
||||
toggleTarget: document.querySelector('[data-file-browser-toggle]'),
|
||||
browserTarget: document.querySelector('[data-file-browser]'),
|
||||
|
@ -14,7 +14,6 @@ describe('WorkItemBreadcrumb', () => {
|
||||
$route = {},
|
||||
listPath = '/epics',
|
||||
isGroup = true,
|
||||
workItemsViewPreference = false,
|
||||
workItemsAlpha = false,
|
||||
props = {},
|
||||
} = {}) => {
|
||||
@ -23,7 +22,6 @@ describe('WorkItemBreadcrumb', () => {
|
||||
workItemType,
|
||||
glFeatures: {
|
||||
workItemEpicsList,
|
||||
workItemsViewPreference,
|
||||
workItemsAlpha,
|
||||
},
|
||||
listPath,
|
||||
@ -78,7 +76,7 @@ describe('WorkItemBreadcrumb', () => {
|
||||
});
|
||||
|
||||
describe('when the workspace is a project', () => {
|
||||
describe('when work item view preference FF is disabled', () => {
|
||||
describe('when in issues mode', () => {
|
||||
it('renders root `Issues` breadcrumb with href on work items list page', () => {
|
||||
createComponent({ isGroup: false, listPath: '/issues', workItemEpicsList: false });
|
||||
|
||||
@ -89,24 +87,6 @@ describe('WorkItemBreadcrumb', () => {
|
||||
},
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when work item view preference FF is enabled', () => {
|
||||
it('renders root breadcrumb with href if user turned work item view off', () => {
|
||||
createComponent({
|
||||
isGroup: false,
|
||||
listPath: '/issues',
|
||||
workItemEpicsList: false,
|
||||
workItemsViewPreference: true,
|
||||
});
|
||||
|
||||
expect(findBreadcrumb().props('items')).toEqual([
|
||||
{
|
||||
text: 'Issues',
|
||||
href: '/issues',
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it('renders root breadcrumb with router link if user turned work item view on and alpha flag is on', () => {
|
||||
window.gon.current_user_use_work_items_view = true;
|
||||
@ -115,7 +95,6 @@ describe('WorkItemBreadcrumb', () => {
|
||||
isGroup: false,
|
||||
listPath: '/issues',
|
||||
workItemEpicsList: false,
|
||||
workItemsViewPreference: true,
|
||||
workItemsAlpha: true,
|
||||
});
|
||||
|
||||
@ -137,7 +116,6 @@ describe('WorkItemBreadcrumb', () => {
|
||||
isGroup: false,
|
||||
listPath: '/issues',
|
||||
workItemEpicsList: false,
|
||||
workItemsViewPreference: true,
|
||||
workItemsAlpha: false,
|
||||
});
|
||||
|
||||
|
@ -50,7 +50,6 @@ describe('WorkItemDrawer', () => {
|
||||
issuableType = TYPE_ISSUE,
|
||||
clickOutsideExcludeSelector = undefined,
|
||||
isGroup = true,
|
||||
workItemsViewPreference = false,
|
||||
mountFn = shallowMountExtended,
|
||||
stubs = { WorkItemDetail },
|
||||
} = {}) => {
|
||||
@ -75,9 +74,6 @@ describe('WorkItemDrawer', () => {
|
||||
hasSubepicsFeature: false,
|
||||
hasLinkedItemsEpicsFeature: true,
|
||||
isGroup,
|
||||
glFeatures: {
|
||||
workItemsViewPreference,
|
||||
},
|
||||
},
|
||||
mocks: {
|
||||
$router: {
|
||||
@ -308,7 +304,7 @@ describe('WorkItemDrawer', () => {
|
||||
expect(mockRouterPush).toHaveBeenCalledWith({ name: 'workItem', params: { iid: '1' } });
|
||||
});
|
||||
|
||||
it('does not call `router.push` when link is a group level work item and we are at the project level', () => {
|
||||
it('calls `router.push` when link is a group level work item and we are at the project level', () => {
|
||||
createComponent({
|
||||
isGroup: false,
|
||||
activeItem: {
|
||||
@ -319,14 +315,12 @@ describe('WorkItemDrawer', () => {
|
||||
});
|
||||
findLinkButton().vm.$emit('click', new MouseEvent('click'));
|
||||
|
||||
expect(visitUrl).toHaveBeenCalledWith('/groups/gitlab-org/gitlab/-/work_items/1');
|
||||
expect(mockRouterPush).not.toHaveBeenCalled();
|
||||
expect(mockRouterPush).toHaveBeenCalledWith({ name: 'workItem', params: { iid: '1' } });
|
||||
});
|
||||
|
||||
it('calls `router.push` when issue as work item view is enabled and work item is in same project', () => {
|
||||
it('calls `router.push` when work item is in same project', () => {
|
||||
createComponent({
|
||||
isGroup: false,
|
||||
workItemsViewPreference: true,
|
||||
activeItem: {
|
||||
iid: '1',
|
||||
webUrl: '/gitlab-org/gitlab/-/work_items/1',
|
||||
@ -340,10 +334,9 @@ describe('WorkItemDrawer', () => {
|
||||
expect(mockRouterPush).toHaveBeenCalledWith({ name: 'workItem', params: { iid: '1' } });
|
||||
});
|
||||
|
||||
it('does not call `router.push` when issue as work item view is enabled and work item is in different project', () => {
|
||||
it('does not call `router.push` when work item is in different project', () => {
|
||||
createComponent({
|
||||
isGroup: false,
|
||||
workItemsViewPreference: true,
|
||||
activeItem: {
|
||||
iid: '1',
|
||||
webUrl: '/gitlab-org/gitlab-other/-/work_items/1',
|
||||
|
@ -111,7 +111,6 @@ describeSkipVue3(skipReason, () => {
|
||||
queryHandler = defaultQueryHandler,
|
||||
countsQueryHandler = defaultCountsQueryHandler,
|
||||
sortPreferenceMutationResponse = mutationHandler,
|
||||
workItemsViewPreference = false,
|
||||
workItemsToggleEnabled = true,
|
||||
workItemPlanningView = false,
|
||||
props = {},
|
||||
@ -120,7 +119,6 @@ describeSkipVue3(skipReason, () => {
|
||||
window.gon = {
|
||||
...window.gon,
|
||||
features: {
|
||||
workItemsViewPreference,
|
||||
workItemsClientSideBoards: false,
|
||||
},
|
||||
current_user_use_work_items_view: workItemsToggleEnabled,
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe CommitSignatures::X509CommitSignature do
|
||||
RSpec.describe CommitSignatures::X509CommitSignature, feature_category: :source_code_management do
|
||||
# This commit is seeded from https://gitlab.com/gitlab-org/gitlab-test
|
||||
# For instructions on how to add more seed data, see the project README
|
||||
# The email for this commit is 'r.meier@siemens.com'
|
||||
|
@ -23,12 +23,11 @@ RSpec.describe 'Git LFS API and storage', feature_category: :source_code_managem
|
||||
|
||||
context 'project specific LFS settings' do
|
||||
let(:body) { upload_body(sample_object) }
|
||||
let(:response) { request && super() }
|
||||
|
||||
before do
|
||||
authorize_upload
|
||||
project.update_attribute(:lfs_enabled, project_lfs_enabled)
|
||||
|
||||
subject
|
||||
end
|
||||
|
||||
describe 'LFS disabled in project' do
|
||||
@ -59,7 +58,48 @@ RSpec.describe 'Git LFS API and storage', feature_category: :source_code_managem
|
||||
context 'when downloading' do
|
||||
subject(:request) { get(objects_url(project, sample_oid), params: {}, headers: headers) }
|
||||
|
||||
it_behaves_like 'LFS http 200 blob response'
|
||||
context 'when LFS object is not linked to project' do
|
||||
it_behaves_like 'LFS http 404 response'
|
||||
end
|
||||
|
||||
context 'when LFS object is linked to project' do
|
||||
before do
|
||||
project.lfs_objects << lfs_object
|
||||
end
|
||||
|
||||
it_behaves_like 'LFS http 200 blob response'
|
||||
end
|
||||
|
||||
context 'when a fork relationship' do
|
||||
let_it_be(:original_project) { create(:project, :public) }
|
||||
let(:forked_project) { fork_project(original_project, user, repository: true) }
|
||||
|
||||
subject(:request) { get objects_url(forked_project, sample_oid), params: {}, headers: headers }
|
||||
|
||||
before do
|
||||
forked_project.add_developer(user)
|
||||
end
|
||||
|
||||
context 'when the LFS object is linked to the original project' do
|
||||
before do
|
||||
create(:lfs_objects_project, project: original_project, lfs_object: lfs_object)
|
||||
end
|
||||
|
||||
it_behaves_like 'LFS http 200 blob response'
|
||||
end
|
||||
|
||||
context 'when the LFS object is not linked to the original project' do
|
||||
it_behaves_like 'LFS http 404 response'
|
||||
end
|
||||
end
|
||||
|
||||
context 'when validate_lfs_object_access FF is disabled' do
|
||||
before do
|
||||
stub_feature_flags(validate_lfs_object_access: false)
|
||||
end
|
||||
|
||||
it_behaves_like 'LFS http 200 blob response'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -346,11 +346,11 @@ module X509Helpers
|
||||
end
|
||||
|
||||
def certificate_issuer
|
||||
'CN=Siemens Issuing CA EE Auth 2016,OU=Siemens Trust Center,serialNumber=ZZZZZZA2,O=Siemens,L=Muenchen,ST=Bayern,C=DE'
|
||||
'CN=Siemens Issuing CA EE Auth 2016,OU=Siemens Trust Center,serialNumber=ZZZZZZA2,O=Siemens,L=Muenchen,ST=Bayern,C=DE' # rubocop:disable convention:Layout/LineLength -- Keep single line for clarity
|
||||
end
|
||||
|
||||
def tag_certificate_issuer
|
||||
'CN=Siemens Issuing CA Medium Strength Authentication 2016,OU=Siemens Trust Center,serialNumber=ZZZZZZA6,O=Siemens,L=Muenchen,ST=Bayern,C=DE'
|
||||
'CN=Siemens Issuing CA Medium Strength Authentication 2016,OU=Siemens Trust Center,serialNumber=ZZZZZZA6,O=Siemens,L=Muenchen,ST=Bayern,C=DE' # rubocop:disable convention:Layout/LineLength -- Keep single line for clarity
|
||||
end
|
||||
|
||||
def certificate_subject
|
||||
@ -365,177 +365,4 @@ module X509Helpers
|
||||
['r.meier@siemens.com']
|
||||
end
|
||||
end
|
||||
|
||||
module User2
|
||||
extend self
|
||||
|
||||
def commit
|
||||
'440bf5b2b499a90d9adcbebe3752f8c6f245a1aa'
|
||||
end
|
||||
|
||||
def path
|
||||
'gitlab-test'
|
||||
end
|
||||
|
||||
def trust_cert
|
||||
<<~TRUSTCERTIFICATE
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICGjCCAaGgAwIBAgIUALnViVfnU0brJasmRkHrn/UnfaQwCgYIKoZIzj0EAwMw
|
||||
KjEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MREwDwYDVQQDEwhzaWdzdG9yZTAeFw0y
|
||||
MjA0MTMyMDA2MTVaFw0zMTEwMDUxMzU2NThaMDcxFTATBgNVBAoTDHNpZ3N0b3Jl
|
||||
LmRldjEeMBwGA1UEAxMVc2lnc3RvcmUtaW50ZXJtZWRpYXRlMHYwEAYHKoZIzj0C
|
||||
AQYFK4EEACIDYgAE8RVS/ysH+NOvuDZyPIZtilgUF9NlarYpAd9HP1vBBH1U5CV7
|
||||
7LSS7s0ZiH4nE7Hv7ptS6LvvR/STk798LVgMzLlJ4HeIfF3tHSaexLcYpSASr1kS
|
||||
0N/RgBJz/9jWCiXno3sweTAOBgNVHQ8BAf8EBAMCAQYwEwYDVR0lBAwwCgYIKwYB
|
||||
BQUHAwMwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQU39Ppz1YkEZb5qNjp
|
||||
KFWixi4YZD8wHwYDVR0jBBgwFoAUWMAeX5FFpWapesyQoZMi0CrFxfowCgYIKoZI
|
||||
zj0EAwMDZwAwZAIwPCsQK4DYiZYDPIaDi5HFKnfxXx6ASSVmERfsynYBiX2X6SJR
|
||||
nZU84/9DZdnFvvxmAjBOt6QpBlc4J/0DxvkTCqpclvziL6BCCPnjdlIB3Pu3BxsP
|
||||
mygUY7Ii2zbdCdliiow=
|
||||
-----END CERTIFICATE-----
|
||||
TRUSTCERTIFICATE
|
||||
end
|
||||
|
||||
def signed_commit_signature
|
||||
<<~SIGNATURE
|
||||
-----BEGIN SIGNED MESSAGE-----
|
||||
MIIEOQYJKoZIhvcNAQcCoIIEKjCCBCYCAQExDTALBglghkgBZQMEAgEwCwYJKoZI
|
||||
hvcNAQcBoIIC2jCCAtYwggJdoAMCAQICFC5R9EXk+ljFhyCs4urRxmCuvQNAMAoG
|
||||
CCqGSM49BAMDMDcxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEeMBwGA1UEAxMVc2ln
|
||||
c3RvcmUtaW50ZXJtZWRpYXRlMB4XDTIzMDgxOTE3NTgwNVoXDTIzMDgxOTE4MDgw
|
||||
NVowADBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABBGajWb10Rt36IMxtJmjRDa7
|
||||
5O6YCLhVq9+LNJSAx2M7p6netqW7W+lwym4z1Y1gXLdGHBshrbx/yr6Trhh2TCej
|
||||
ggF8MIIBeDAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwHQYD
|
||||
VR0OBBYEFBttEjG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YToShK6iRmJ/NpILA=
|
||||
-----END SIGNED MESSAGE-----
|
||||
SIGNATURE
|
||||
end
|
||||
|
||||
def signed_commit_base_data
|
||||
<<~SIGNEDDATA
|
||||
tree 7d5ee08cadaa161d731c56a9265feef130143b07
|
||||
parent 4b4918a572fa86f9771e5ba40fbd48e1eb03e2c6
|
||||
author Mona Lisa <gitlabgpgtest@gmail.com> 1692467872 +0000
|
||||
committer Mona Lisa <gitlabgpgtest@gmail.com> 1692467872 +0000
|
||||
|
||||
Sigstore Signed Commit
|
||||
SIGNEDDATA
|
||||
end
|
||||
|
||||
def signed_commit_time
|
||||
Time.at(1692467872)
|
||||
end
|
||||
|
||||
def signed_tag_time
|
||||
Time.at(1692467872)
|
||||
end
|
||||
|
||||
def signed_tag_signature
|
||||
<<~SIGNATURE
|
||||
-----BEGIN SIGNED MESSAGE-----
|
||||
MIIEOgYJKoZIhvcNAQcCoIIEKzCCBCcCAQExDTALBglghkgBZQMEAgEwCwYJKoZI
|
||||
hvcNAQcBoIIC2zCCAtcwggJdoAMCAQICFB5qFHBSNfcJDZecnHK5/tleuX3yMAoG
|
||||
CCqGSM49BAMDMDcxFTATBgNVBAoTDHNpZ3N0b3JlLmRldjEeMBwGA1UEAxMVc2ln
|
||||
c3RvcmUtaW50ZXJtZWRpYXRlMB4XDTIzMDgxOTE3NTgzM1oXDTIzMDgxOTE4MDgz
|
||||
M1owADBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABKJtbdL88PM8lE21CuyDYlZm
|
||||
0xZYCThoXZSGmULrgE5+hfroCIbLswOi5i6TyB8j4CCe0Jxeu94Jn+76SXF+lbej
|
||||
ggF8MIIBeDAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwHQYD
|
||||
VR0OBBYEFBkU3IBENVJYeyK9b56vbGGrjPwYMB8GA1UdIwQYMBaAFN/T6c9WJBGW
|
||||
+ajY6ShVosYuGGQ/MCUGA1UdEQEB/wQbMBmBF2dpdGxhYmdwZ3Rlc3RAZ21haWwu
|
||||
Y29tMCwGCisGAQQBg78wAQEEHmh0dHBzOi8vZ2l0aHViLmNvbS9sb2dpbi9vYXV0
|
||||
aDAuBgorBgEEAYO/MAEIBCAMHmh0dHBzOi8vZ2l0aHViLmNvbS9sb2dpbi9vYXV0
|
||||
aDCBiwYKKwYBBAHWeQIEAgR9BHsAeQB3AN09MGrGxxEyYxkeHJlnNwKiSl643jyt
|
||||
/4eKcoAvKe6OAAABig7y4tYAAAQDAEgwRgIhAMUjWh8ayhjWDI3faFah3Du/7IuY
|
||||
xzbUXaPQnCyUbvwwAiEAwHgWv8fmKMudbVu37Nbq/c1cdnQqDK9Y2UGtlmzaLrYw
|
||||
CgYIKoZIzj0EAwMDaAAwZQIwZTKZlS4HNJH48km3pxG95JTbldSBhvFlrpIEVRUd
|
||||
TEK6uGQJmpIm1WYQjbJbiVS8AjEA+2NoAdMuRpa2k13HUfWQEMtzQcxZMMNB7Yux
|
||||
9ZIADOlFp701ujtFSZAXgqGL3FYKMYIBJTCCASECAQEwTzA3MRUwEwYDVQQKEwxz
|
||||
aWdzdG9yZS5kZXYxHjAcBgNVBAMTFXNpZ3N0b3JlLWludGVybWVkaWF0ZQIUHmoU
|
||||
cFI19wkNl5yccrn+2V65ffIwCwYJYIZIAWUDBAIBoGkwGAYJKoZIhvcNAQkDMQsG
|
||||
CSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjMwODE5MTc1ODMzWjAvBgkqhkiG
|
||||
9w0BCQQxIgQgwpYCAlbS6KnfgxQD3SATWUbdUssLaBWkHwTkmtCye4wwCgYIKoZI
|
||||
zj0EAwIERzBFAiB8y5bGhWJvWCHQyma7oF038ZPLzXmsDJyJffJHoAb6XAIhAOW3
|
||||
gxuYuJAKP86B1fY0vYCZHF8vU6SZAcE6teSDowwq
|
||||
-----END SIGNED MESSAGE-----
|
||||
SIGNATURE
|
||||
end
|
||||
|
||||
def signed_tag_base_data
|
||||
<<~SIGNEDDATA
|
||||
object 440bf5b2b499a90d9adcbebe3752f8c6f245a1aa
|
||||
type commit
|
||||
tag v1.1.2
|
||||
tagger Mona Lisa <gitlabgpgtest@gmail.com> 1692467901 +0000
|
||||
|
||||
Sigstore Signed Tag
|
||||
SIGNEDDATA
|
||||
end
|
||||
|
||||
def certificate_serial
|
||||
264441215000592123389532407734419590292801651520
|
||||
end
|
||||
|
||||
def tag_certificate_serial
|
||||
173635382582380059990335547381753891120957980146
|
||||
end
|
||||
|
||||
def certificate_subject_key_identifier
|
||||
'1B:6D:12:31:B3:36:9A:42:A8:0E:2D:95:96:38:A1:AC:64:76:64:1B'
|
||||
end
|
||||
|
||||
def tag_certificate_subject_key_identifier
|
||||
'19:14:DC:80:44:35:52:58:7B:22:BD:6F:9E:AF:6C:61:AB:8C:FC:18'
|
||||
end
|
||||
|
||||
def issuer_subject_key_identifier
|
||||
'DF:D3:E9:CF:56:24:11:96:F9:A8:D8:E9:28:55:A2:C6:2E:18:64:3F'
|
||||
end
|
||||
|
||||
def tag_issuer_subject_key_identifier
|
||||
'DF:D3:E9:CF:56:24:11:96:F9:A8:D8:E9:28:55:A2:C6:2E:18:64:3F'
|
||||
end
|
||||
|
||||
def certificate_email
|
||||
'gitlabgpgtest@gmail.com'
|
||||
end
|
||||
|
||||
def tag_email
|
||||
'gitlabgpgtest@gmail.com'
|
||||
end
|
||||
|
||||
def certificate_issuer
|
||||
'CN=sigstore-intermediate,O=sigstore.dev'
|
||||
end
|
||||
|
||||
def tag_certificate_issuer
|
||||
'CN=sigstore-intermediate,O=sigstore.dev'
|
||||
end
|
||||
|
||||
def certificate_subject
|
||||
''
|
||||
end
|
||||
|
||||
def names
|
||||
['Mona Lisa']
|
||||
end
|
||||
|
||||
def emails
|
||||
['gitlabgpgtest@gmail.com']
|
||||
end
|
||||
end
|
||||
end
|
176
spec/support/helpers/x509_helpers/user_2.rb
Normal file
176
spec/support/helpers/x509_helpers/user_2.rb
Normal file
@ -0,0 +1,176 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module X509Helpers
|
||||
module User2
|
||||
extend self
|
||||
|
||||
def commit
|
||||
'440bf5b2b499a90d9adcbebe3752f8c6f245a1aa'
|
||||
end
|
||||
|
||||
def path
|
||||
'gitlab-test'
|
||||
end
|
||||
|
||||
def trust_cert
|
||||
<<~TRUSTCERTIFICATE
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICGjCCAaGgAwIBAgIUALnViVfnU0brJasmRkHrn/UnfaQwCgYIKoZIzj0EAwMw
|
||||
KjEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MREwDwYDVQQDEwhzaWdzdG9yZTAeFw0y
|
||||
MjA0MTMyMDA2MTVaFw0zMTEwMDUxMzU2NThaMDcxFTATBgNVBAoTDHNpZ3N0b3Jl
|
||||
LmRldjEeMBwGA1UEAxMVc2lnc3RvcmUtaW50ZXJtZWRpYXRlMHYwEAYHKoZIzj0C
|
||||
AQYFK4EEACIDYgAE8RVS/ysH+NOvuDZyPIZtilgUF9NlarYpAd9HP1vBBH1U5CV7
|
||||
7LSS7s0ZiH4nE7Hv7ptS6LvvR/STk798LVgMzLlJ4HeIfF3tHSaexLcYpSASr1kS
|
||||
0N/RgBJz/9jWCiXno3sweTAOBgNVHQ8BAf8EBAMCAQYwEwYDVR0lBAwwCgYIKwYB
|
||||
BQUHAwMwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4EFgQU39Ppz1YkEZb5qNjp
|
||||
KFWixi4YZD8wHwYDVR0jBBgwFoAUWMAeX5FFpWapesyQoZMi0CrFxfowCgYIKoZI
|
||||
zj0EAwMDZwAwZAIwPCsQK4DYiZYDPIaDi5HFKnfxXx6ASSVmERfsynYBiX2X6SJR
|
||||
nZU84/9DZdnFvvxmAjBOt6QpBlc4J/0DxvkTCqpclvziL6BCCPnjdlIB3Pu3BxsP
|
||||
mygUY7Ii2zbdCdliiow=
|
||||
-----END CERTIFICATE-----
|
||||
TRUSTCERTIFICATE
|
||||
end
|
||||
|
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wZAIwWKXYyP5FvbfhvfLkV0tN887ax1eg7TmF1Tzkugag
|
||||
cLJ5MzK3xYNcUO/3AxO3H/b8AjBD9DF6R4kFO4cXoqnpsk2FTUeSPiUJ+0x2PDFG
|
||||
gQZvoMWz7CnwjXml8XDEKNpYoPkxggElMIIBIQIBATBPMDcxFTATBgNVBAoTDHNp
|
||||
Z3N0b3JlLmRldjEeMBwGA1UEAxMVc2lnc3RvcmUtaW50ZXJtZWRpYXRlAhQuUfRF
|
||||
5PpYxYcgrOLq0cZgrr0DQDALBglghkgBZQMEAgGgaTAYBgkqhkiG9w0BCQMxCwYJ
|
||||
KoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0yMzA4MTkxNzU4MDVaMC8GCSqGSIb3
|
||||
DQEJBDEiBCB4B7DeGk22WmBseJzjjRJcQsyYxu0PNDAFXq55uJ7MSzAKBggqhkjO
|
||||
PQQDAgRHMEUCIQCNegIrK6m1xyGuu4lw06l22VQsmO74/k3H236jCFF+bAIgAX1N
|
||||
rxBFWnjWboZmAV1NuduTD/YToShK6iRmJ/NpILA=
|
||||
-----END SIGNED MESSAGE-----
|
||||
SIGNATURE
|
||||
end
|
||||
|
||||
def signed_commit_base_data
|
||||
<<~SIGNEDDATA
|
||||
tree 7d5ee08cadaa161d731c56a9265feef130143b07
|
||||
parent 4b4918a572fa86f9771e5ba40fbd48e1eb03e2c6
|
||||
author Mona Lisa <gitlabgpgtest@gmail.com> 1692467872 +0000
|
||||
committer Mona Lisa <gitlabgpgtest@gmail.com> 1692467872 +0000
|
||||
|
||||
Sigstore Signed Commit
|
||||
SIGNEDDATA
|
||||
end
|
||||
|
||||
def signed_commit_time
|
||||
Time.at(1692467872)
|
||||
end
|
||||
|
||||
def signed_tag_time
|
||||
Time.at(1692467872)
|
||||
end
|
||||
|
||||
def signed_tag_signature
|
||||
<<~SIGNATURE
|
||||
-----BEGIN SIGNED MESSAGE-----
|
||||
MIIEOgYJKoZIhvcNAQcCoIIEKzCCBCcCAQ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WQEMtzQcxZMMNB7Yux
|
||||
9ZIADOlFp701ujtFSZAXgqGL3FYKMYIBJTCCASECAQEwTzA3MRUwEwYDVQQKEwxz
|
||||
aWdzdG9yZS5kZXYxHjAcBgNVBAMTFXNpZ3N0b3JlLWludGVybWVkaWF0ZQIUHmoU
|
||||
cFI19wkNl5yccrn+2V65ffIwCwYJYIZIAWUDBAIBoGkwGAYJKoZIhvcNAQkDMQsG
|
||||
CSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjMwODE5MTc1ODMzWjAvBgkqhkiG
|
||||
9w0BCQQxIgQgwpYCAlbS6KnfgxQD3SATWUbdUssLaBWkHwTkmtCye4wwCgYIKoZI
|
||||
zj0EAwIERzBFAiB8y5bGhWJvWCHQyma7oF038ZPLzXmsDJyJffJHoAb6XAIhAOW3
|
||||
gxuYuJAKP86B1fY0vYCZHF8vU6SZAcE6teSDowwq
|
||||
-----END SIGNED MESSAGE-----
|
||||
SIGNATURE
|
||||
end
|
||||
|
||||
def signed_tag_base_data
|
||||
<<~SIGNEDDATA
|
||||
object 440bf5b2b499a90d9adcbebe3752f8c6f245a1aa
|
||||
type commit
|
||||
tag v1.1.2
|
||||
tagger Mona Lisa <gitlabgpgtest@gmail.com> 1692467901 +0000
|
||||
|
||||
Sigstore Signed Tag
|
||||
SIGNEDDATA
|
||||
end
|
||||
|
||||
def certificate_serial
|
||||
264441215000592123389532407734419590292801651520
|
||||
end
|
||||
|
||||
def tag_certificate_serial
|
||||
173635382582380059990335547381753891120957980146
|
||||
end
|
||||
|
||||
def certificate_subject_key_identifier
|
||||
'1B:6D:12:31:B3:36:9A:42:A8:0E:2D:95:96:38:A1:AC:64:76:64:1B'
|
||||
end
|
||||
|
||||
def tag_certificate_subject_key_identifier
|
||||
'19:14:DC:80:44:35:52:58:7B:22:BD:6F:9E:AF:6C:61:AB:8C:FC:18'
|
||||
end
|
||||
|
||||
def issuer_subject_key_identifier
|
||||
'DF:D3:E9:CF:56:24:11:96:F9:A8:D8:E9:28:55:A2:C6:2E:18:64:3F'
|
||||
end
|
||||
|
||||
def tag_issuer_subject_key_identifier
|
||||
'DF:D3:E9:CF:56:24:11:96:F9:A8:D8:E9:28:55:A2:C6:2E:18:64:3F'
|
||||
end
|
||||
|
||||
def certificate_email
|
||||
'gitlabgpgtest@gmail.com'
|
||||
end
|
||||
|
||||
def tag_email
|
||||
'gitlabgpgtest@gmail.com'
|
||||
end
|
||||
|
||||
def certificate_issuer
|
||||
'CN=sigstore-intermediate,O=sigstore.dev'
|
||||
end
|
||||
|
||||
def tag_certificate_issuer
|
||||
'CN=sigstore-intermediate,O=sigstore.dev'
|
||||
end
|
||||
|
||||
def certificate_subject
|
||||
''
|
||||
end
|
||||
|
||||
def names
|
||||
['Mona Lisa']
|
||||
end
|
||||
|
||||
def emails
|
||||
['gitlabgpgtest@gmail.com']
|
||||
end
|
||||
end
|
||||
end
|
@ -182,6 +182,7 @@ RSpec.shared_examples 'LFS http requests' do
|
||||
context 'with download permission' do
|
||||
before do
|
||||
authorize_download
|
||||
project.lfs_objects << lfs_object if defined?(project) && project
|
||||
end
|
||||
|
||||
describe 'download request' do
|
||||
|
70
yarn.lock
70
yarn.lock
@ -2591,51 +2591,51 @@
|
||||
resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8"
|
||||
integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==
|
||||
|
||||
"@sentry-internal/browser-utils@9.24.0":
|
||||
version "9.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-9.24.0.tgz#039e31b4e198370cfd9e70f297d29b1d2a49b3d0"
|
||||
integrity sha512-fWIrHyui8KKufnbqhGyDvvr+u9wiOEEzxXEjs/CKp+6fa+jej6Mk8K+su1f/mz7R3HVzhxvht/gZ+y193uK4qw==
|
||||
"@sentry-internal/browser-utils@9.27.0":
|
||||
version "9.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-9.27.0.tgz#1860a9925aadb700fc273d59d4d6e7083408f765"
|
||||
integrity sha512-SJa7f6Ct1BzP8rWEomnshSGN1CmT+axNKvT+StrbFPD6AyHnYfFLJpKgc2iToIJHB/pmeuOI9dUwqtzVx+5nSw==
|
||||
dependencies:
|
||||
"@sentry/core" "9.24.0"
|
||||
"@sentry/core" "9.27.0"
|
||||
|
||||
"@sentry-internal/feedback@9.24.0":
|
||||
version "9.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-9.24.0.tgz#c2f2e92ccf18301cd9eb28879294ec8081443eb6"
|
||||
integrity sha512-Z9jQqKzRppwAEqiytLWNV8JOo52vlxcSGz52FjKx3KXG75PXwk0M3sBXh762WoGLisUIRLTp8LOk6304L/O8dg==
|
||||
"@sentry-internal/feedback@9.27.0":
|
||||
version "9.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-9.27.0.tgz#ec9311033b401f4f89304c47ffde2de942a281ef"
|
||||
integrity sha512-e7L8eG0y63RulN352lmafoCCfQGg4jLVT8YLx6096eWu/YKLkgmVpgi8livsT5WREnH+HB+iFSrejOwK7cRkhw==
|
||||
dependencies:
|
||||
"@sentry/core" "9.24.0"
|
||||
"@sentry/core" "9.27.0"
|
||||
|
||||
"@sentry-internal/replay-canvas@9.24.0":
|
||||
version "9.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-9.24.0.tgz#a90786c850e7a10eb445e86c6d12375822f17785"
|
||||
integrity sha512-506RdDF6iE8hMyzpzp9Vc0GM7kELxxs7UCoi/6KpvXFftcydWI3S2bru8dEZsxVoKh2hdle6SpbNgl+iPI0DSQ==
|
||||
"@sentry-internal/replay-canvas@9.27.0":
|
||||
version "9.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-9.27.0.tgz#d18e95ace5c6bd593935cacea1980b9e640b3afe"
|
||||
integrity sha512-44rVSt3LCH6qePYRQrl4WUBwnkOk9dzinmnKmuwRksEdDOkVq5KBRhi/IDr7omwSpX8C+KrX5alfKhOx1cP0gQ==
|
||||
dependencies:
|
||||
"@sentry-internal/replay" "9.24.0"
|
||||
"@sentry/core" "9.24.0"
|
||||
"@sentry-internal/replay" "9.27.0"
|
||||
"@sentry/core" "9.27.0"
|
||||
|
||||
"@sentry-internal/replay@9.24.0":
|
||||
version "9.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-9.24.0.tgz#470b11a07266df7896f5f615a441a5fb13c6cc29"
|
||||
integrity sha512-312wMPeQI8K2vO/lA/CF6Uv5UReoZC7RarsNUJEoOKa9Bq1BXWUq929oTHzu/2NDv194H2u3eqSGsSp6xiuKTw==
|
||||
"@sentry-internal/replay@9.27.0":
|
||||
version "9.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-9.27.0.tgz#e357d45a6fc2b80ac312798cc5b1b758c5ca9c66"
|
||||
integrity sha512-n2kO1wOfCG7GxkMAqbYYkpgTqJM5tuVLdp0JuNCqTOLTXWvw6svWGaYKlYpKUgsK9X/GDzJYSXZmfe+Dbg+FJQ==
|
||||
dependencies:
|
||||
"@sentry-internal/browser-utils" "9.24.0"
|
||||
"@sentry/core" "9.24.0"
|
||||
"@sentry-internal/browser-utils" "9.27.0"
|
||||
"@sentry/core" "9.27.0"
|
||||
|
||||
"@sentry/browser@9.24.0":
|
||||
version "9.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-9.24.0.tgz#842075609edb55541bca914693a3732be1140157"
|
||||
integrity sha512-RP+27/owvIqD4J0TibIHK1UcA7iObxLOXBEilDKjaJOZMLhv3JkpU8A+UI9pFzEYqeIGVDDaBzYgbCHrLWcoCA==
|
||||
"@sentry/browser@9.27.0":
|
||||
version "9.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-9.27.0.tgz#5aa87a34600aa7ee19e29d2295266c18a32d7bc7"
|
||||
integrity sha512-geR3lhRJOmUQqi1WgovLSYcD/f66zYnctdnDEa7j1BW2XIB1nlTJn0mpYyAHghXKkUN/pBpp1Z+Jk0XlVwFYVg==
|
||||
dependencies:
|
||||
"@sentry-internal/browser-utils" "9.24.0"
|
||||
"@sentry-internal/feedback" "9.24.0"
|
||||
"@sentry-internal/replay" "9.24.0"
|
||||
"@sentry-internal/replay-canvas" "9.24.0"
|
||||
"@sentry/core" "9.24.0"
|
||||
"@sentry-internal/browser-utils" "9.27.0"
|
||||
"@sentry-internal/feedback" "9.27.0"
|
||||
"@sentry-internal/replay" "9.27.0"
|
||||
"@sentry-internal/replay-canvas" "9.27.0"
|
||||
"@sentry/core" "9.27.0"
|
||||
|
||||
"@sentry/core@9.24.0":
|
||||
version "9.24.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-9.24.0.tgz#a8a8681df9818f7dbf23b27a319a1ef4e1c48076"
|
||||
integrity sha512-uRWrB4Y49ZOWcDLCXqdjd2Fs6Onill0GQI+JgXMw7wa+i03+QRiQvUAUyde8O62jR4dvP3GDo9PDWnDNhi3z5A==
|
||||
"@sentry/core@9.27.0":
|
||||
version "9.27.0"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-9.27.0.tgz#e97d6957c243d95f9f05ccb553b937838bb500ea"
|
||||
integrity sha512-Zb2SSAdWXQjTem+sVWrrAq9L6YYfxyoTwtapaE6C6qZBR5C8Uak0wcYww8StaCFH7dDA/PSW+VxOwjNXocrQHQ==
|
||||
|
||||
"@sinclair/typebox@^0.27.8":
|
||||
version "0.27.8"
|
||||
|
Reference in New Issue
Block a user