Use IssuesFinder instead of project.issues.visible_to_user

parent 4de6799e
...@@ -29,7 +29,11 @@ module Projects ...@@ -29,7 +29,11 @@ module Projects
private private
def issue def issue
@issue ||= project.issues.visible_to_user(current_user).find_by!(iid: params[:id]) @issue ||=
IssuesFinder.new(current_user, project_id: project.id, state: 'all')
.execute
.where(iid: params[:id])
.first!
end end
def authorize_read_issue! def authorize_read_issue!
......
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