This is the corresponding EE merge request for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7006.