Backports for ee-2112
What does this MR do?
Backport changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2112
Are there points in the code the reviewer needs to double check?
I didn't backport stuffs with those @project.feature_available?
because we're not doing this for other EE features, and I am unsure if we should do.
Should we?
What are the relevant issue numbers?
Closes #34716 (closed)