Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install hexagonit.portletroles

How to install hexagonit.portletroles

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install hexagonit.portletroles
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0 Available View build log
Windows (64-bit)
1.0 Available View build log
Mac OS X (10.5+)
1.0 Available View build log
Linux (32-bit)
1.0 Available View build log
Linux (64-bit)
1.0 Available View build log
 
Author
License
BSD
Lastest release
version 1.0 on May 23rd, 2012

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>

Subscribe to package updates

Last updated May 23rd, 2012

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.