Issue
- On a Site with only Public Pages, if I create an asset (such as Web Content or Documents and Media) the "Viewable by" permission is set to "Anyone (Guest)" by default.
- After creating a Private Page on the Site, the "Viewable by" permission is set to "Site Members" by default.
Environment
- Liferay DXP 7.0+
Resolution
1. If you create a new asset in Site Administration (eg.: Content > Documents and Media)
- If you start a Liferay bundle and create a Document on the default Liferay site, the "Viewable By" dropdown is set to Anyone (meaning that Guest users can see the document).
- However, as soon as you create a private page for the site, then any Document that you create will be viewable by Site Members by default.
2. If you use the Documents and Media Portlet placed on the page
- If the content is created from a Public page, the default permissions will be Viewable by everyone.
- If the content is created from a Private page, the default permissions will be Viewable by Site members.
The behavior described in Point 1 is somewhat restrictive because it assumes that if the content was created from a Site with a private page, it's likely that the content shouldn't be viewable by everyone. Of course, this might not always be the case, but Liferay opted for this more "secure" way to be applied by default.
Unfortunately, there is no out of the box solution that would allow you to change this default behavior.
Additional Information
- A Feature Request already exists for changing the behavior and to allow administrators to set the default "Viewable by" permission for assets.
- Please refer to LPS-91421 and LPS-194481 for more details.
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In