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 plone.app.lockingbehavior

How to install plone.app.lockingbehavior

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install plone.app.lockingbehavior
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.0.1 Available View build log
1.0 Available View build log
Windows (64-bit)
1.0.1 Available View build log
1.0 Available View build log
Mac OS X (10.5+)
1.0.1 Available View build log
1.0 Available View build log
Linux (32-bit)
1.0.1 Available View build log
1.0 Available View build log
Linux (64-bit)
1.0.1 Available View build log
1.0 Available View build log
 
License
GPL2
Lastest release
version 1.0.1 on Dec 7th, 2011

Introduction

The plone.app.lockingbehavior package provides a plone.locking integration for dexterity.

Usage

Just use the behavior plone.app.lockingbehavior.behaviors.ILocking in your dexterity content type. Also check the condition of the "edit" action of your type, it should check if the object is locked.

In your profiles/default/types/YOURTYPE.xml add the behavior and the edit action:

<?xml version="1.0"?>
<object name="example.conference.presenter" meta_type="Dexterity FTI"
        i18n:domain="example.conference" xmlns:i18n="http://xml.zope.org/namespaces/i18n">

    <!-- enabled behaviors -->
    <property name="behaviors">
        <element value="plone.app.lockingbehavior.behaviors.ILocking" />
    </property>

    <action action_id="edit"
            visible="True"
            title="Edit"
            category="object"
            url_expr="string:${object_url}/edit"
            condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user|python:True">
        <permission value="Modify portal content"/>
    </action>

</object>

The ILocking behavior enables locking support for your content type. This adds the ITTWLockable interface from plone.locking. The locking viewlet from plone.app.layout is also working for the dexterity content type.

Changelog

1.0.1 (2011-12-06)
  • Fix version requirement of plone.dexterity: 1.1 is compatible. [jone]
1.0 (2011-11-27)
  • Fixed problem: locks were not released when editing content and saving it without changing anything. Fixed by using new IEditFinishedEvent instead of IObjectModifiedEvent. [jbaumann]
  • Fixed problem which caused widget traversal to fail. The edit form is now protected for non-anonymous user, since locking for anyonmous users does not work anyway. [jbaumann]
  • Initial implementation [jbaumann]

Subscribe to package updates

Last updated Dec 7th, 2011

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.