Hide portlet types in the add portlet dropdown

Last week in a customer meeting I got the request if we could disable portlets in the dropdown menu on the manage portlets screen because there were too many and users get confused. 'normal' site editors might only need 3 or 4 portlet types and don't need to assign login, search, calendar, news item etc. portlets, depending on the sites they manage. Static text, collection and 1-2 custom portlets are all they need.

It reminded me of a feature in collective.cover, where you can install extra tiles in the system, but the collective.cover control panel still has an in/out widget where you can disable tiles from covers' add menu. Already added tiles still work, you don't want to remove functionality, but just unclutter the add menu for certain editors.

I found the following stackoverflow thread with a solution to remove a portlet definitive from the portal dropdown here: https://stackoverflow.com/questions/5897656/disabling-portlet-types-site-wide-in-plone . But it would only last as long as the generic setup portlets.xml profile for the portlets isn't run again with an upgrade and I would suggest that Users with 'Manage portal' still have all portlets available for edge/webmaster cases.

My question: is this a need you have had before, has there been any patches/add'ons that you did in the past to provide this in existing sites? Is this a valid and existing use case?

I remember having talked with others at conferences/sprints about a more generic concept of beginner/intermediate/advanced users where you can enable advanced features to certain groups of users, of which this is a specific instance. We already have the Site Admin role and in some projects I create a separate "portlet manager' Role which I can assign to users using the sharing/tab.

In Plone 6 or 7 we might get rid of portlets alltogether, but until that time... And also in a mosaic/tile universe you might want to control the editing environment for groups of users.

1 Like

For Castle we are considering a way to hide/show enable/disable certain tiles based on roles. Since Castle doesn't have portlets but implements something similar as tiles in slots, that does seem like the same use case.

Work in progress: https://github.com/collective/collective.restrictportlets

1 Like