Reputation: 21
I am working in a project where we need to create first steps for User Management in Liferay portal. I need to know how I am able to hide portal pages / portlets inside a community depending on which roles user has.
Can I use Teams inside a Community? Should I use Liferay UM API or can I configure portlet or page so that it is visible only for certain Teams / roles.
Any help is appreciated. Thanks.
Upvotes: 2
Views: 3232
Reputation: 4730
Categories your users based on their roles / actions for your Portal. as;
Roles are groupings of users that share a particular function within the portal, according to a particular scope.
Administrators can add roles and grant permissions to users for various functions within portal applications.
Upvotes: 1
Reputation: 15086
You can hide portlet by changing the permissions in Configuration (accesible from portlet header menu).
However such portlet will still be visible to all users with ugly message saying that they don't have permissions. You can hide it completely by putting following into portal-ext.properties.
layout.show.portlet.access.denied=false
For hiding pages go to the "Manage pages" and then select required page (or go to the page at first if and then to manage pages if you have complicated page structure - page will be already selected) and then change the permissions at the bottom (you might need to change tab from children to general or something).
Upvotes: 1
Reputation: 36767
You go to manage pages and then select the page you want to hide and then select 'permissions'. You can define permissions per role there.
For portlets go to wrench-> configuration -> permissions.
Upvotes: 6