Hide or Show Content Depending on Member Profile in Plone

How to show or hide content by checking which member profile the user is using (contributor, editor, manager etc)

This code below will show the contents of the tal:profilecheck element to site editors.

<tal:profilecheck tal:condition="python:portal.portal_membership.getAuthenticatedMember().has_role('Editor')">
<!-- this content will appear only for users of the 'Editor' profile
</tal:profilecheck>

Specific Permissions

You can check if a user has specific permissions and is not just a member of a role by using the below TAL (for example, can the user manage portlets?):

tal:define="checkPermission nocall: context/portal_membership/checkPermission"
<div tal:condition="python:checkPermission('Portlets: Manage portlets', context)"> ... </div>

Those permissions can be found in the 'security' tab in ZMI - would be nice to find a per-user based security