Legacy Knowledge Base
Published Jul. 2, 2025

Ability to set default "Viewable by" permission for assets

Written By

Tímea Bihari

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

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.
Did this article resolve your issue ?

Legacy Knowledge Base