BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
117ccb89
Commit
117ccb89
authored
Mar 01, 2018
by
Jose Ivan Vargas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix milestone delete button showing for all users
parent
5e8138aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
_milestone.html.haml
app/views/shared/milestones/_milestone.html.haml
+10
-10
milestone_spec.rb
spec/features/milestone_spec.rb
+11
-0
No files found.
app/views/shared/milestones/_milestone.html.haml
View file @
117ccb89
...
...
@@ -56,13 +56,13 @@
=
link_to
'Close Milestone'
,
project_milestone_path
(
@project
,
milestone
,
milestone:
{
state_event: :close
}),
method: :put
,
remote:
true
,
class:
"btn btn-xs btn-close btn-grouped"
%button
.js-delete-milestone-button.btn.btn-xs.btn-grouped.btn-danger
{
data:
{
toggle:
'modal'
,
target:
'#delete-milestone-modal'
,
milestone_id:
milestone
.
id
,
milestone_title:
markdown_field
(
milestone
,
:title
),
milestone_url:
project_milestone_path
(
milestone
.
project
,
milestone
),
milestone_issue_count:
milestone
.
issues
.
count
,
milestone_merge_request_count:
milestone
.
merge_requests
.
count
},
disabled:
true
}
=
_
(
'Delete'
)
=
icon
(
'spin spinner'
,
class:
'js-loading-icon hidden'
)
%button
.js-delete-milestone-button.btn.btn-xs.btn-grouped.btn-danger
{
data:
{
toggle:
'modal'
,
target:
'#delete-milestone-modal'
,
milestone_id:
milestone
.
id
,
milestone_title:
markdown_field
(
milestone
,
:title
),
milestone_url:
project_milestone_path
(
milestone
.
project
,
milestone
),
milestone_issue_count:
milestone
.
issues
.
count
,
milestone_merge_request_count:
milestone
.
merge_requests
.
count
},
disabled:
true
}
=
_
(
'Delete'
)
=
icon
(
'spin spinner'
,
class:
'js-loading-icon hidden'
)
spec/features/milestone_spec.rb
View file @
117ccb89
...
...
@@ -97,4 +97,15 @@ feature 'Milestone' do
end
end
end
feature
'Deleting a milestone'
do
scenario
"The delete milestone button does not show for unauthorized users"
do
create
(
:milestone
,
project:
project
,
title:
8.7
)
sign_out
(
user
)
visit
group_milestones_path
(
group
)
expect
(
page
).
to
have_selector
(
'.js-delete-milestone-button'
,
count:
0
)
end
end
end
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