Draft: Fix notes count when notes are internal
What does this MR do and why?
Related to #377303 (closed).
This MR fixes a problem where guest users could see a wrong number of notes on a noteable if there were some internal notes added.
Screenshots or screen recordings
Will add once we sort out some questions
How to set up and validate locally
- As a user with at least reporter access, find or open an issue
- Add an internal note to that issue
- Go back to the issues list
- The number of notes on the issue includes the internal note
- Log out and login with (or impersonate) a user who has guest access to the project where the issue with the internal note
- Go to the issues list
- On master: the number of notes on the issue includes the internal note even if we are guests
- With these changes: the number of notes does not count internal ones when we are guests
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.