[Solved] Configure portal actions from policy add-on?

I'd like to configure the portal actions from my policy add-on, instead of doing it manually with /@@actions-controlpanel. How?

Also, when deleting an action, does it really delete it?

Update: I can toggle items with an actions.xml file, similar to /Products/CMFPlone/profiles/default/actions.xml, but how to delete actions? Can it be done from a actions.xml file, or from a python script?

Yes, in the actions,xml file you can remove an action with the remove attribute:

    <object name="user" meta_type="CMF Action Category">
        <object name="logout" meta_type="CMF Action" remove="True" />
    </object>

It does remove actions from the control panel, bur the actions are still active.

For example, the site map is still active even if the sitemap action is removed from the control panel.

"@@my-action" is not a "Action", it's a View. You can disable the view via "protection with a permission" or override the view with an empty custom view or a redirect to portal root.

Thanks Jan, I was hoping for something else, but your suggestions are valid.

Plone Foundation Code of Conduct