Skip to content

Ensure all Serializers receive `current_user`

Oswaldo Ferreir requested to merge enforce-current-user-usage-on-entities into master

https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1711 passes current_user to the MergeRequestSerializer, which passes current_user the it's Entity leafs (e.g. PipelineSerializer). The problem is that new leafs were added while https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1711 wasn't merged, causing conflicts and more overhead about current_user or user usage.

This MR makes ensures all entities receive current_user, avoiding errors and overhead.

cc @ayufan @grzesiek

What are the relevant issue numbers?

Merge request reports