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
6f963302
Commit
6f963302
authored
Jul 03, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
2c6a18b4
ae7a4397
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
app/assets/javascripts/manual_ordering.js
app/assets/javascripts/manual_ordering.js
+1
-1
changelogs/unreleased/rj-fix-manual-order.yml
changelogs/unreleased/rj-fix-manual-order.yml
+5
-0
spec/features/groups/issues_spec.rb
spec/features/groups/issues_spec.rb
+19
-0
No files found.
app/assets/javascripts/manual_ordering.js
View file @
6f963302
...
...
@@ -21,7 +21,7 @@ const updateIssue = (url, issueList, { move_before_id, move_after_id }) =>
const
initManualOrdering
=
()
=>
{
const
issueList
=
document
.
querySelector
(
'
.manual-ordering
'
);
if
(
!
issueList
||
!
(
gon
.
features
&&
gon
.
features
.
manualSorting
))
{
if
(
!
issueList
||
!
(
gon
.
features
&&
gon
.
features
.
manualSorting
)
||
!
(
gon
.
current_user_id
>
0
)
)
{
return
;
}
...
...
changelogs/unreleased/rj-fix-manual-order.yml
0 → 100644
View file @
6f963302
---
title
:
Don't let logged out user do manual order
merge_request
:
30264
author
:
type
:
fixed
spec/features/groups/issues_spec.rb
View file @
6f963302
...
...
@@ -150,6 +150,25 @@ describe 'Group issues page' do
check_issue_order
end
it
'issues should not be draggable when user is not logged in'
,
:js
do
sign_out
(
user_in_group
)
visit
issues_group_path
(
group
,
sort:
'relative_position'
)
drag_to
(
selector:
'.manual-ordering'
,
from_index:
0
,
to_index:
2
)
wait_for_requests
# Issue order should remain the same
page
.
within
(
'.manual-ordering'
)
do
expect
(
find
(
'.issue:nth-child(1) .title'
)).
to
have_content
(
'Issue #1'
)
expect
(
find
(
'.issue:nth-child(2) .title'
)).
to
have_content
(
'Issue #2'
)
expect
(
find
(
'.issue:nth-child(3) .title'
)).
to
have_content
(
'Issue #3'
)
end
end
def
check_issue_order
page
.
within
(
'.manual-ordering'
)
do
expect
(
find
(
'.issue:nth-child(1) .title'
)).
to
have_content
(
'Issue #2'
)
...
...
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