Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b95e6ae4
Commit
b95e6ae4
authored
Nov 19, 2019
by
Andrew Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove :release_edit_page Feature Flag
Enable the ability to edit releases for all!
parent
14eb7a47
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
21 deletions
+2
-21
app/assets/javascripts/releases/list/components/release_block.vue
...ts/javascripts/releases/list/components/release_block.vue
+1
-3
app/controllers/projects/releases_controller.rb
app/controllers/projects/releases_controller.rb
+0
-2
app/presenters/release_presenter.rb
app/presenters/release_presenter.rb
+1
-2
spec/frontend/releases/list/components/release_block_spec.js
spec/frontend/releases/list/components/release_block_spec.js
+0
-6
spec/presenters/release_presenter_spec.rb
spec/presenters/release_presenter_spec.rb
+0
-8
No files found.
app/assets/javascripts/releases/list/components/release_block.vue
View file @
b95e6ae4
...
...
@@ -77,9 +77,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
);
},
shouldShowFooter
()
{
return
this
.
glFeatures
.
releaseIssueSummary
;
...
...
app/controllers/projects/releases_controller.rb
View file @
b95e6ae4
...
...
@@ -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
)
end
before_action
:authorize_update_release!
,
only:
%i[edit update]
...
...
@@ -43,7 +42,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
...
...
app/presenters/release_presenter.rb
View file @
b95e6ae4
...
...
@@ -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
)
can?
(
current_user
,
:update_release
,
release
)
end
end
spec/frontend/releases/list/components/release_block_spec.js
View file @
b95e6ae4
...
...
@@ -29,7 +29,6 @@ describe('Release block', () => {
},
provide
:
{
glFeatures
:
{
releaseEditPage
:
true
,
releaseIssueSummary
:
true
,
...
featureFlags
,
},
...
...
@@ -179,11 +178,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
;
...
...
spec/presenters/release_presenter_spec.rb
View file @
b95e6ae4
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment