Hi, While i was testing migrating to 7.5.2 i found and issue. In master branch restriction seems fine but in 7.6, 7.5, 7.5.1, 7.5.2 releases has an issue. I think in 199fff8a55fc31d23512abaf102a0270538e202d merge the feature is broken. Changes should be like [this](https://github.com/elastic/elasticsearch/pull/46731/files) Thanks