Hide confidential events in ruby
What does this MR do?
This hides events the current_user does not have access to by filtering them out in the EventsFinder
. That finder now returns a paginatable array. The pagination itself is also done in the finder to limit the amount of events loaded into memory.
The FinderWithCrossProjectAccess
was not yet compatible with array's returned from the execute
method, so I've added the option to define the model to be returned
What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/51791
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Bob Van Landuyt