plone.app.lockingbehavior


Nameplone.app.lockingbehavior JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/plone/plone.app.lockingbehavior/
SummaryLocking integration for dexterity content objects.
upload_time2023-10-06 22:21:38
maintainer
docs_urlNone
authorPlone Foundation
requires_python>=3.8
licenseGPL version 2
keywords dexterity locking behavior plone
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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
----------------

* http://pypi.python.org/pypi/plone.locking

Changelog
=========

.. You should *NOT* be adding new change log entries to this file.
   You should create a file in the news directory instead.
   For helpful instructions, please see:
   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst

.. towncrier release notes start

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]

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/plone/plone.app.lockingbehavior/",
    "name": "plone.app.lockingbehavior",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "dexterity locking behavior plone",
    "author": "Plone Foundation",
    "author_email": "mailto:dexterity-development@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/fd/c7/9d6da3ddc06ea9eb32285b668eed64f00ed70371fe163d14acfb4cf6a3cc/plone.app.lockingbehavior-2.0.0.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\nThe ``plone.app.lockingbehavior`` package provides a ``plone.locking`` integration\nfor dexterity.\n\nUsage\n-----\n\nJust use the behavior ``plone.app.lockingbehavior.behaviors.ILocking`` in\nyour dexterity content type. Also check the condition of the \"edit\" action\nof your type, it should check if the object is locked.\n\nIn your *profiles/default/types/YOURTYPE.xml* add the behavior and the\nedit action::\n\n    <?xml version=\"1.0\"?>\n    <object name=\"example.conference.presenter\" meta_type=\"Dexterity FTI\"\n            i18n:domain=\"example.conference\" xmlns:i18n=\"http://xml.zope.org/namespaces/i18n\">\n\n        <!-- enabled behaviors -->\n        <property name=\"behaviors\">\n            <element value=\"plone.app.lockingbehavior.behaviors.ILocking\" />\n        </property>\n\n        <action action_id=\"edit\"\n                visible=\"True\"\n                title=\"Edit\"\n                category=\"object\"\n                url_expr=\"string:${object_url}/edit\"\n                condition_expr=\"not:object/@@plone_lock_info/is_locked_for_current_user|python:True\">\n            <permission value=\"Modify portal content\"/>\n        </action>\n\n    </object>\n\nThe ILocking behavior enables locking support for your content type. This adds\nthe ``ITTWLockable`` interface from ``plone.locking``. The locking viewlet\nfrom ``plone.app.layout`` is also working for the dexterity content type.\n\n\nMore Information\n----------------\n\n* http://pypi.python.org/pypi/plone.locking\n\nChangelog\n=========\n\n.. You should *NOT* be adding new change log entries to this file.\n   You should create a file in the news directory instead.\n   For helpful instructions, please see:\n   https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst\n\n.. towncrier release notes start\n\n2.0.0 (2023-10-07)\n------------------\n\nInternal:\n\n\n- Update configuration files.\n  [plone devs] (cfffba8c)\n\n\n1.0.7 (2020-04-20)\n------------------\n\nBug fixes:\n\n\n- Minor packaging updates. (#1)\n\n\n1.0.6 (2018-11-21)\n------------------\n\nBug fixes:\n\n\n- Cleanup project level files (setup.py, .travis-ci.yml...) [maurits]\n  [gforcada] (#2524)\n\n\n1.0.5 (2017-02-12)\n------------------\n\nBug fixes:\n\n- Add coding header on python files.\n  [gforcada]\n\n- Unskip test for Zope 4, as isolation problems are already fixed.\n  [thet]\n\n\n1.0.4 (2016-05-02)\n------------------\n\nNew:\n\n- Add behavior short name.\n  [jensens]\n\n\n1.0.3 (2016-02-20)\n------------------\n\nFixes:\n\n- Use a functional layer to resolve test isolation problems.\n  [gforcada]\n\n- Refactor doctest to an integration test and skip it for Zope 4 due to isolation problems.\n  [pbauer]\n\n- Changed i18n_domain to \"plone\".\n  Requires plone.app.locales 4.3.9 or higher.\n  [claytonc]\n\n\n1.0.2 (2015-09-09)\n------------------\n\n- Remove superfluous 'for'.\n  [fulv]\n\n- Fix tests: redirect was changed in commit e7367258.\n  [jone]\n\n- If the content is locked, the redirect points to the default view and\n  not to the absolute_url of the object. It avoids image opening on redirect\n  [parruc]\n\n\n1.0.1 (2011-12-06)\n------------------\n\n- Fix version requirement of plone.dexterity: 1.1 is compatible.\n  [jone]\n\n\n1.0 (2011-11-27)\n----------------\n\n- Fixed problem: locks were not released when editing content and saving\n  it without changing anything. Fixed by using new IEditFinishedEvent instead\n  of IObjectModifiedEvent.\n  [jbaumann]\n\n- Fixed problem which caused widget traversal to fail.\n  The edit form is now protected for non-anonymous user, since locking for\n  anyonmous users does not work anyway.\n  [jbaumann]\n\n- Initial implementation\n  [jbaumann]\n",
    "bugtrack_url": null,
    "license": "GPL version 2",
    "summary": "Locking integration for dexterity content objects.",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://github.com/plone/plone.app.lockingbehavior/"
    },
    "split_keywords": [
        "dexterity",
        "locking",
        "behavior",
        "plone"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1004ecaba7cf6265ce26406ff7e16665f46b01b8f98030daf615d6af31e3585",
                "md5": "6a5d406f1620d50720fc8767604b31d2",
                "sha256": "6950f71f5d6a72166c943364f488dcb089a742074e4125cd1947cbc597576ff5"
            },
            "downloads": -1,
            "filename": "plone.app.lockingbehavior-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6a5d406f1620d50720fc8767604b31d2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7796,
            "upload_time": "2023-10-06T22:21:37",
            "upload_time_iso_8601": "2023-10-06T22:21:37.081961Z",
            "url": "https://files.pythonhosted.org/packages/d1/00/4ecaba7cf6265ce26406ff7e16665f46b01b8f98030daf615d6af31e3585/plone.app.lockingbehavior-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fdc79d6da3ddc06ea9eb32285b668eed64f00ed70371fe163d14acfb4cf6a3cc",
                "md5": "d9317dc3496d179f4847e0b3c7e0d05f",
                "sha256": "194ed577ee9fcdb7cf28575db51f08e0be11fab7b552f36e27c5fe160b792fd8"
            },
            "downloads": -1,
            "filename": "plone.app.lockingbehavior-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d9317dc3496d179f4847e0b3c7e0d05f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14640,
            "upload_time": "2023-10-06T22:21:38",
            "upload_time_iso_8601": "2023-10-06T22:21:38.807941Z",
            "url": "https://files.pythonhosted.org/packages/fd/c7/9d6da3ddc06ea9eb32285b668eed64f00ed70371fe163d14acfb4cf6a3cc/plone.app.lockingbehavior-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-06 22:21:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "plone",
    "github_project": "plone.app.lockingbehavior",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "plone.app.lockingbehavior"
}
        
Elapsed time: 0.12841s