Skip to main content

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

3.0.0 (2026-05-16)

Internal:

  • Make final release, no further changes.

3.0.0a1 (2025-11-19)

Breaking changes:

  • Replace pkg_resources namespace with PEP 420 native namespace. Support only Plone 6.2 and Python 3.10+. (#3928)

2.0.3 (2025-09-11)

Internal:

  • Move distribution to src layout [gforcada] (#4217)

2.0.2 (2025-01-24)

Bug fixes:

  • Fix DeprecationWarnings. [maurits] (#4090)

2.0.1 (2024-07-31)

Bug fixes:

  • Remove setuptools fossils. [maurits] (#72)

2.0.0 (2023-10-07)

Internal:

  • Update configuration files. [plone devs] (cfffba8c)

1.0.7 (2020-04-20)

Bug fixes:

  • Minor packaging updates. (#1)

1.0.6 (2018-11-21)

Bug fixes:

  • Cleanup project level files (setup.py, .travis-ci.yml…) [maurits] [gforcada] (#2524)

1.0.5 (2017-02-12)

Bug fixes:

  • Add coding header on python files. [gforcada]

  • Unskip test for Zope 4, as isolation problems are already fixed. [thet]

1.0.4 (2016-05-02)

New:

  • Add behavior short name. [jensens]

1.0.3 (2016-02-20)

Fixes:

  • Use a functional layer to resolve test isolation problems. [gforcada]

  • Refactor doctest to an integration test and skip it for Zope 4 due to isolation problems. [pbauer]

  • Changed i18n_domain to “plone”. Requires plone.app.locales 4.3.9 or higher. [claytonc]

1.0.2 (2015-09-09)

  • Remove superfluous ‘for’. [fulv]

  • Fix tests: redirect was changed in commit e7367258. [jone]

  • If the content is locked, the redirect points to the default view and not to the absolute_url of the object. It avoids image opening on redirect [parruc]

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


Download files

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

Source Distribution

plone_app_lockingbehavior-3.0.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plone_app_lockingbehavior-3.0.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file plone_app_lockingbehavior-3.0.0.tar.gz.

File metadata

File hashes

Hashes for plone_app_lockingbehavior-3.0.0.tar.gz
Algorithm Hash digest
SHA256 caf961a5a91c8e98fc034706d4669a47cf6e6b961808a2d261de499422bd04e6
MD5 80be9a2e3ef6e1b3f7ccb8989f097e11
BLAKE2b-256 f3ee89560fbdae16377bb564378f4f003003edc523b1a8952bb57fbe228f8a6b

See more details on using hashes here.

File details

Details for the file plone_app_lockingbehavior-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for plone_app_lockingbehavior-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d418474c7601b9e5e9a61c57b457b7a7a5b3a919caf972db50bda4adcdfdd2af
MD5 65be857bbc26035550b997ac4abaacd1
BLAKE2b-256 8e2769e588ebced2ff738ae6d353e5a0be8da8cf91004d2b100346792bbdf4b5

See more details on using hashes here.

Supported by

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