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.

Further Documentation URL

http://packages.python.org/hexagonit.portletroles/

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 | RSS feed

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.

Source Distribution

hexagonit.portletroles-1.0.zip (21.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page