Skip to main content

Provides roles for adding each portlets.

Project description

hexagonit.portletroles overrides each portlets for Plone to provide different edit_view permissions to them.

Assigning different roles to those permissons happens through rolemap.xml.

Only who has permission can manage portlets through @@manage-portlets then.

Repository URL

https://github.com/hexagonit/hexagonit.portletroles/

Example rolemap.xml:

<?xml version="1.0"?>
<rolemap>
  <permissions>
    <permission name="Portlets: Manage portlets"
                acquire="True">
      <role name="Manager"/>
      <role name="Site Administrator"/>
      <role name="Editor" />
    </permission>
    <!-- Permission for moving and deleting portlets  -->
    <permission name="Portlets: Manage own portlets"
            acquire="True">
      <role name="Manager"/>
      <role name="Site Administrator"/>
      <role name="Editor" />
    </permission>
    <permission name="Portlets: Manage Events portlet"
                acquire="True">
      <role name="Manager"/>
      <role name="Site Administrator"/>
      <role name="Editor" />
    </permission>
    <permission name="Portlets: Manage Login portlet"
                acquire="True">
      <role name="Manager"/>
      <role name="Site Administrator"/>
    </permission>
    ...
  </permissions>
</rolemap>

With this rolemap.xml, user who has Editor role can add and manage Events portlet, but not Login portlet.

You can find which permissions are registered from overrides.zcml file in the package.

Permission for deleting and moving up/down portlets is controled by permission: Portlets: Manage own portlets.

Changelog

1.0 (2012-04-18)

  • Test for deleting and moving up/down portlet added. [taito]

0.9 (2012-03-08)

  • Code cleanups. [taito]
  • Sphinx documentation updated. [taito]

0.8 (2012-03-08)

  • Release for production use. [taito]

Contributors

  • Kai Lautaportti <kai.lautaportti at hexagonit.fi>
  • Taito Horiuchi <taito.horiuchi at hexagonit.fi>

Project details


Release history Release notifications

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hexagonit.portletroles, version 1.0
Filename, size & hash File type Python version Upload date
hexagonit.portletroles-1.0.zip (21.7 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page