Port of fix-issue-32506 to EE
What does this MR do?
Resolves conflicts in fix-issue-32506 with EE. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11498
What are the relevant issue numbers?
Edited by Michael Kozono
Resolves conflicts in fix-issue-32506 with EE. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11498