I need to customize as to which portlet appear in the "Add more portlet menu" as shown in the image below:
I need to restrict the number of portlets displayed in this menu based on the logged-in user or site (community). So that Site-owner or Site-admin will be able to add only those portlets to their pages which the omni-admin decides for them.
Does Liferay provide any such functionality (through configuration or something) or do I have to create a new portlet and a hook to achieve this?
Environment: Liferay 6.1 CE GA2
Any idea would be very much appreciated.
Thank You
The following is an answer given to the same question in the Liferay forum:
You can limit what portlets can be added to the page from the Administration side and don't have to do any development.
You will need to create a role however and add everyone on it. Here are the steps for achieving this:
Control Panel
-> Roles
and make a Regular Role (not an Organization or Site role)Portal
-> Site
-> Page
-> and check Update
as a defined permission.Site Application
-> (choose Portlet Name that you want your user add to the page) -> Add to page
.Control Panel
-> User and Organizations
. Click on your User
and go to Roles
.Server Administration
and execute the Clean Up Permissions
to clear permissions for the Guest
and Power Users
roles.This should now make it so that whatever user is attached to this role they will see an "Add" button on the left hand corner and will only be able to add portlets you specify in the role permissions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With