I am trying to restrict the access to media attachments to post. When I upload a media file (image, doc file or pdf file) I can set the access restriction with capabilities of the groups. It doesnt really enforce those restriction. The media files are still accessible when user (not logged in) clicks the link or when direct URL is used in the address bar.
For custom posts (e.g woocommerce products) it work fine, but not with the media attachments.
Any solution for that?