Locking integration for dexterity content objects.
Project description
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.
More Information
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]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for plone.app.lockingbehavior-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 349aadac756462a9d922fef7482bce3ab99ce476fc8d54e0a4d8e8ac26ec6c95 |
|
MD5 | a25745f1f40c6298da1b228ccd95ee27 |
|
BLAKE2b-256 | 138def4898b72369845d10d8f4ef143faaba43579d5678b572a718e5df296892 |