Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Permissions: Add custom roles to "Viewable by" dropdown
Hello everybody.
We are using Liferay DXP 7.1 and wonder, if it is possible to add custom roles to the "Viewable by" dropdown which is shown if new content is added, and if it is possible to define a specific default selection there. Of course, I did some initial research, but I just found some discussions related to Liferay 6.x and accordingly hooks as solution. Please find a further description and the reason why we need such a functionality below.
Thanks in advance!
André
Further description and explanation:
If we add new content to one of our sites, e.g., Web Contents, Blog Entries or Documents, Liferay shows a "Permission" section with a "Viewable by" checkbox and additional permission options ("More options") at the bottom of the editor. See this screenshot taken from the Web Content Editor:
This is very helpful to set some initial permissions, but it is limited to Anyone (Guest), Site Member and Owner. In our system, we are using an additional role (let's call it "Community Member"), which is very important for our sites. We are using the roles this way:
If an editor wants to create content for Community Members only, currently the editor has to choose Owner and then grant VIEW via the permissions menu, which is cumbersome and error-prone. It would be much easier, if the editor is able to select the role Community Member directly, or if we even could set the Community Member role by default.
We are using Liferay DXP 7.1 and wonder, if it is possible to add custom roles to the "Viewable by" dropdown which is shown if new content is added, and if it is possible to define a specific default selection there. Of course, I did some initial research, but I just found some discussions related to Liferay 6.x and accordingly hooks as solution. Please find a further description and the reason why we need such a functionality below.
Thanks in advance!
André
Further description and explanation:
If we add new content to one of our sites, e.g., Web Contents, Blog Entries or Documents, Liferay shows a "Permission" section with a "Viewable by" checkbox and additional permission options ("More options") at the bottom of the editor. See this screenshot taken from the Web Content Editor:

This is very helpful to set some initial permissions, but it is limited to Anyone (Guest), Site Member and Owner. In our system, we are using an additional role (let's call it "Community Member"), which is very important for our sites. We are using the roles this way:
- Guest: Just to make public content visible on public pages.
- Site Member: Registered users who just get a brief overview of the site.
- Community Member: Paid subscribers who get full access to all contents of the site.
- Owner: Work in progress/Editor wants to define very specific permission settings by using the Permissions menu.
If an editor wants to create content for Community Members only, currently the editor has to choose Owner and then grant VIEW via the permissions menu, which is cumbersome and error-prone. It would be much easier, if the editor is able to select the role Community Member directly, or if we even could set the Community Member role by default.
Attachments:
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™