Commit f5a2eb37 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch 'remove-release-edit-page-ff' into 'master'

Remove :release_edit_page Feature Flag

See merge request gitlab-org/gitlab!20401
parents 6f462049 b95e6ae4
......@@ -82,9 +82,7 @@ export default {
return n__('Milestone', 'Milestones', this.release.milestones.length);
},
shouldShowEditButton() {
return Boolean(
this.glFeatures.releaseEditPage && this.release._links && this.release._links.edit_url,
);
return Boolean(this.release._links && this.release._links.edit_url);
},
shouldShowEvidence() {
return this.glFeatures.releaseEvidenceCollection;
......
......@@ -6,7 +6,6 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action :release, only: %i[edit update]
before_action :authorize_read_release!
before_action do
push_frontend_feature_flag(:release_edit_page, project, default_enabled: true)
push_frontend_feature_flag(:release_issue_summary, project)
push_frontend_feature_flag(:release_evidence_collection, project)
end
......@@ -44,7 +43,6 @@ class Projects::ReleasesController < Projects::ApplicationController
private
def authorize_update_release!
access_denied! unless Feature.enabled?(:release_edit_page, project, default_enabled: true)
access_denied! unless can?(current_user, :update_release, release)
end
......
......@@ -58,7 +58,6 @@ class ReleasePresenter < Gitlab::View::Presenter::Delegated
end
def release_edit_page_available?
::Feature.enabled?(:release_edit_page, project, default_enabled: true) &&
can?(current_user, :update_release, release)
end
end
......@@ -30,7 +30,6 @@ describe('Release block', () => {
},
provide: {
glFeatures: {
releaseEditPage: true,
releaseIssueSummary: true,
...featureFlags,
},
......@@ -180,11 +179,6 @@ describe('Release block', () => {
});
});
it('does not render an edit button if the releaseEditPage feature flag is disabled', () =>
factory(releaseClone, { releaseEditPage: false }).then(() => {
expect(editButton().exists()).toBe(false);
}));
it('does not render the milestone list if no milestones are associated to the release', () => {
delete releaseClone.milestones;
......
......@@ -90,14 +90,6 @@ describe ReleasePresenter do
is_expected.to match /#{edit_project_release_url(project, release)}/
end
context 'when release_edit_page feature flag is disabled' do
before do
stub_feature_flags(release_edit_page: false)
end
it { is_expected.to be_nil }
end
context 'when a user is not allowed to update a release' do
let(:presenter) { described_class.new(release, current_user: guest) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment