Commit 268cc509 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Allow guests to set issue position on create

Update permission should not be required since we're not really updating
the sibling issues. Their relative position values may change if there
is not enough space and we need to shift some issues, but these numbers
are purely internal and does not change the position of the issue
relative to the existing issues.
parent 3c49f96b
......@@ -74,9 +74,7 @@ module Issues
def issuable_for_positioning(id, positioning_scope)
return unless id
issue = positioning_scope.find(id)
issue if can?(current_user, :update_issue, issue)
positioning_scope.find(id)
end
def create_assignee_note(issue, old_assignees)
......
......@@ -97,8 +97,6 @@ RSpec.describe Issues::CreateService do
let(:issue_after) { create(:issue, project: project, relative_position: 50) }
before do
project.add_reporter(user)
opts.merge!(move_between_ids: [issue_before.id, issue_after.id])
end
......
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