Media not restricted
-
Using Ultimate Member 2.8.6.
Need to restrict media. For example, the desired outcome is if a website user goes to a media item that is restricted to logged-in members, for example, https://www.example.com/memberonlydocument.pdf, instead of the pdf, they get the restricted content warning.
In the media library, I’ve set several pages and media items to members only. Pages are restricted as expected, but media is fully accessible without logging in. For example, if person does not log in, https://www.example.com/memberonlypage does not display and displays Restricted Access Message. However, if same person who is not logged in goes to https://www.example.com/memberonlydocument.pdf, which is also members only, they get the media.
To replicate:
- Embed a link to a media item on any page of a website.
- In WordPress dashboard, go to Ultimate Member > Settings > Access and make sure Enable the “Content Restriction” settings for post types that Media is checked.
- Go to Media > Library, find the media item, and click Edit.
- At bottom of page, check “Restrict access to this post?”, set “Who can access this post?” to Logged in users, then select user role.
- Click Update.
- Open another browser or some browser window where you are not logged into the website.
- Go to URL for the file. Note that the media file appears without being blocked.
- You must be logged in to reply to this topic.