0

Liferay: remove default guest permissions for new web content

liferay version: 6.1.2

Control Panel --> web content --> + ADD --> Basic Web Content

let me know what to do to achieve this, so that when I add new web content there wont be any permissions for guest role enter image description here

dreambigcoder
  • 1,859
  • 4
  • 22
  • 32

2 Answers2

2

By default Liferay 6.1 does not check if guest has view permission on content in public sites. This is so for performance reasons based on the assumption all content in public site is ... well ... public. If you want to change that, you need to set journal.article.view.permission.check.enabled to true in portal_ext.properties

With that change in place, you can go to Control Panel -> Roles -> Guest Role -> Define permissions and set the default permissions for Web Content resource

Speaking of permissions in 6.1, you may find this post useful.

Milen Dyankov
  • 2,972
  • 14
  • 25
  • I did set the property to true in portal-ext.properties and there Guest role doesn't have any permissions for web content in the setting. But when I add a new webcontent guest role still has ADD DISCUSSION/View permissions set...how can I have no permissions for Guest by default – dreambigcoder Feb 17 '17 at 20:29
0

By adding Filters to the class JournalArticleLocalServiceImpl before calling addArticleResources() method and setting the addGuestPermissions boolean to false, I'm able to set no permissions to Guest by default.

dreambigcoder
  • 1,859
  • 4
  • 22
  • 32