Fix cross referencing for private and internal projects
What does this MR do?
It fixes cross referencing objects that are not publicly visible.
current_user correctly whenever
extractor is used in
all_references (Mentionable concern)
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7926/diffs#056b58f8b11b5ed98472bf7ee291814409cbde33_49_51 we started using memorised
extractor. However when called for the first time from
nil - that is correct.
However when it is called for the second time - when trying to create cross references - it should be set to
note.author. But we use already initialised
There is a permission check as the next step. But for
current_user = nil all objects that are not public are evaluated as not accessible to the user.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- API support added
- 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
What are the relevant issue numbers?
Closes #31978 (closed)