Make all Serializers receive `current_user` instead `user` [CE]
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
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
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?
Merge request reports
Activity
@grzesiek We think got bad spec situation for the
DeploymentsController
. Inner leafs ofDeploymentsEntity
are expectingcurrent_user
, but since we don't reach them on the specs, it seems to have passed onmaster
.Edit:
DeploymentSerializer
doesn't need to receiveuser
orcurrent_user
for that particular usage, so I'm removing it for now.Edited by Oswaldo Ferreirmentioned in issue #32099 (moved)
added 1 commit
- 368bf99e - Remove unnecessary user hash being passed to DeploymentSerializer
- Resolved by Kamil Trzcińśki
@oswaldo I left just a single question! Thanks for resolving this
user/current_user
chaos😸 Thanks @grzesiek, answered the question
😃 mentioned in issue #32112 (moved)
mentioned in commit bae0a060
mentioned in commit 6d81a382
mentioned in issue #31934 (closed)