Skip to content
Snippets Groups Projects

Make all Serializers receive `current_user` instead `user` [CE]

Merged Oswaldo Ferreir requested to merge enforce-current-user-usage-on-entities into master
All threads resolved!

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.

EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1869

What are the relevant issue numbers?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @oswaldo I left just a single question! Thanks for resolving this user/current_user chaos 😸

  • Oswaldo Ferreir changed title from Ensure all Serializers receive current_user instead user [CE] to Make all Serializers receive current_user instead user [CE]

    changed title from Ensure all Serializers receive current_user instead user [CE] to Make all Serializers receive current_user instead user [CE]

  • Author Developer

    Thanks @grzesiek, answered the question 😃

  • mentioned in issue #32112 (moved)

  • Kamil Trzcińśki approved this merge request

    approved this merge request

  • Kamil Trzcińśki resolved all discussions

    resolved all discussions

  • mentioned in commit bae0a060

  • Picked into 9-2-stable, will go into 9.2.0-rc1

  • mentioned in commit 6d81a382

  • Please register or sign in to reply
    Loading