pass in current_user in MergeRequest and MergeRequestsHelper
What does this MR do?
Let MergeRequest#issues_mentioned_but_not_closing
pass in current_user
.
Let MergeRequestsHelper's #mr_closes_issues
#mr_issues_mentioned_but_not_closing
pass in current_user
Are there points in the code the reviewer needs to double check?
No.
Why was this MR needed?
MergeRequest#issues_mentioned_but_not_closing called the method #closes_issues.
In the past the call should pass current_user
, but a recent change removed the passing of current_user, which I think is unexpected.
MergeRequestsHelper also didn't pass in current_user
.
current_user
is used in visibility control. Without passing it in, the default value self.author
is used.
There can be confusing visibility issues when mentioning issues of another private project. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8624#note_21614962
I think the related UI part is app/views/projects/merge_requests/widget/_open.html.haml (Line 33~45)
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together