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 { ...@@ -82,9 +82,7 @@ export default {
return n__('Milestone', 'Milestones', this.release.milestones.length); return n__('Milestone', 'Milestones', this.release.milestones.length);
}, },
shouldShowEditButton() { shouldShowEditButton() {
return Boolean( return Boolean(this.release._links && this.release._links.edit_url);
this.glFeatures.releaseEditPage && this.release._links && this.release._links.edit_url,
);
}, },
shouldShowEvidence() { shouldShowEvidence() {
return this.glFeatures.releaseEvidenceCollection; return this.glFeatures.releaseEvidenceCollection;
......
...@@ -6,7 +6,6 @@ class Projects::ReleasesController < Projects::ApplicationController ...@@ -6,7 +6,6 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action :release, only: %i[edit update] before_action :release, only: %i[edit update]
before_action :authorize_read_release! before_action :authorize_read_release!
before_action do 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_issue_summary, project)
push_frontend_feature_flag(:release_evidence_collection, project) push_frontend_feature_flag(:release_evidence_collection, project)
end end
...@@ -44,7 +43,6 @@ class Projects::ReleasesController < Projects::ApplicationController ...@@ -44,7 +43,6 @@ class Projects::ReleasesController < Projects::ApplicationController
private private
def authorize_update_release! 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) access_denied! unless can?(current_user, :update_release, release)
end end
......
...@@ -58,7 +58,6 @@ class ReleasePresenter < Gitlab::View::Presenter::Delegated ...@@ -58,7 +58,6 @@ class ReleasePresenter < Gitlab::View::Presenter::Delegated
end end
def release_edit_page_available? def release_edit_page_available?
::Feature.enabled?(:release_edit_page, project, default_enabled: true) && can?(current_user, :update_release, release)
can?(current_user, :update_release, release)
end end
end end
...@@ -30,7 +30,6 @@ describe('Release block', () => { ...@@ -30,7 +30,6 @@ describe('Release block', () => {
}, },
provide: { provide: {
glFeatures: { glFeatures: {
releaseEditPage: true,
releaseIssueSummary: true, releaseIssueSummary: true,
...featureFlags, ...featureFlags,
}, },
...@@ -180,11 +179,6 @@ describe('Release block', () => { ...@@ -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', () => { it('does not render the milestone list if no milestones are associated to the release', () => {
delete releaseClone.milestones; delete releaseClone.milestones;
......
...@@ -90,14 +90,6 @@ describe ReleasePresenter do ...@@ -90,14 +90,6 @@ describe ReleasePresenter do
is_expected.to match /#{edit_project_release_url(project, release)}/ is_expected.to match /#{edit_project_release_url(project, release)}/
end 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 context 'when a user is not allowed to update a release' do
let(:presenter) { described_class.new(release, current_user: guest) } 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