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
webContent for a given role in Liferay 7
Hi,
I want to create web contents that can't be visualized by a given role.
For example let's say I have the roles normal-user and plus-user. I want to create a Web Content that only plus-user's can see.
If I create a WebContent and enable the "View" permissions on it only for the plus-user and display this WebContent in a WebContent display portlet, normal-user's can view it. Is this the expected behaviour? I have disable the default View permission for every role, even the the default guest role.
I must be missing something because I believe this should be a pretty standard and obvious feature.
Thanks
Update Well it seems that I was misunderstanding the way how I could observe the effects of my changes.
It seems that the configuration that I've described works. Although, the web content is hidden only when listing web contents with the Web Content List portlet. If I set individually a Web Content Display portlet to show the private content, any role will be able to see it, even if it hasn't permission. The same happens If I share the URL to the web content.
So my question now is: Ignoring view permissions is the default behaviour for the Web Content Display portlet? With Asset Publisher portlet this doesn't happen. The web content is hidden when listing and viewing if the role hasn't view permissions on that content.
Ramalingaiah. D:So my question now is: Ignoring view permissions is the default behaviour for the Web Content Display portlet? With Asset Publisher portlet this doesn't happen. The web content is hidden when listing and viewing if the role hasn't view permissions on that content.
Yes, it's the default behavior for the web content display portlet.
In 6.x and earlier versions of Liferay, this was governed by the
portal property
journal.article.view.permission.check.enabled
. In 7.x and
later versions of Liferay, this is governed by adding a configuration
for the
com.liferay.journal.configuration.JournalServiceConfiguration
configuration (you can add .cfg
as a file extension and
drop it in osgi/configs
, or you can use the Control
Panel) and setting the value articleViewPermissionsCheckEnabled.
Hi Minhchau Dang,
thank you for replying
i am using Liferay 7.0 version
where is control Panel inside set the values articleViewPermissionsCheckEnabled
can you please guide me
Thank....
Ramalingaiah. D:where is control Panel inside set the values articleViewPermissionsCheckEnabled
- Navigate to Control Panel > Configuration > System Settings
- Under Web Experience, choose Web Content
- Look for the settings "Article view permissions check enabled"
Since it's marked as "default settings for all instances" rather than system-wide (which you can read about more in the System Settings part of the documentation), it's possible that changing it through the UI won't actually do anything for existing portal instances, and you'll need use files in order to replace the values for existing portal instances. However, it's also possible that it will just work.
Powered by Liferay™