Commit bfe94698 authored by Sean McGivern's avatar Sean McGivern Committed by Rémy Coutable

Merge branch 'board-dragging-disabled' into 'master'

Stop unauthorized users dragging on issue boards

Closes #23763

See merge request !7096
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent e6d6c415
...@@ -17,6 +17,7 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -17,6 +17,7 @@ Please view this file on the master branch, on stable branches it's out of date.
- Fix reply-by-email not working due to queue name mismatch. !7068 - Fix reply-by-email not working due to queue name mismatch. !7068
- Fix 404 for group pages when GitLab setup uses relative url. !7071 - Fix 404 for group pages when GitLab setup uses relative url. !7071
- Fix `User#to_reference`. !7088 - Fix `User#to_reference`. !7088
- Fix unauthorized users dragging on issue boards. !7096
## 8.13.0 (2016-10-22) ## 8.13.0 (2016-10-22)
......
...@@ -5,7 +5,7 @@ module BoardsHelper ...@@ -5,7 +5,7 @@ module BoardsHelper
{ {
endpoint: namespace_project_boards_path(@project.namespace, @project), endpoint: namespace_project_boards_path(@project.namespace, @project),
board_id: board.id, board_id: board.id,
disabled: !can?(current_user, :admin_list, @project), disabled: "#{!can?(current_user, :admin_list, @project)}",
issue_link_base: namespace_project_issues_path(@project.namespace, @project) issue_link_base: namespace_project_issues_path(@project.namespace, @project)
} }
end end
......
...@@ -624,6 +624,10 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -624,6 +624,10 @@ describe 'Issue Boards', feature: true, js: true do
it 'does not show create new list' do it 'does not show create new list' do
expect(page).not_to have_selector('.js-new-board-list') expect(page).not_to have_selector('.js-new-board-list')
end end
it 'does not allow dragging' do
expect(page).not_to have_selector('.user-can-drag')
end
end end
context 'as guest user' do context 'as guest user' do
......
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