Commit 8a024494 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Do not show issue move form unless user can move

parent 8d1b7f95
......@@ -67,7 +67,7 @@
- if can? current_user, :admin_label, issuable.project
= link_to 'Create new label', new_namespace_project_label_path(issuable.project.namespace, issuable.project), target: :blank
- if issuable.is_a?(Issue)
- if issuable.is_a?(Issue) && can?(current_user, :move_issue, issuable.project)
%hr
.form-group
= f.label :move_to_project_id, 'Move', class: 'control-label'
......
......@@ -64,7 +64,7 @@ describe Issues::MoveService, services: true do
end
before do
note_params = { noteable: old_issue, project: old_project, author: user}
note_params = { noteable: old_issue, project: old_project, author: user }
create(:system_note, note_params.merge(note: note_contents.first))
create(:note, note_params.merge(note: note_contents.second))
create(:system_note, note_params.merge(note: note_contents.third))
......
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