collective.behavior.lastmodifier

Adds a behavior that tracks down the last user that modified an object


Keywords
Python, Plone
License
CNRI-Python-GPL-Compatible
Install
pip install collective.behavior.lastmodifier==1.0.0rc1

Documentation

image

collective.behavior.lastmodifier

Adds a behavior that tracks down the last user that modified an object.

The plone.last_modifier behavior that can be added to any dexterity content.

Objects with that behavior will update the last_modifier attribute of the object with the currently authenticated user id:

  • when an object is created
  • every time an ObjectModifiedEvent is fired.

There is a tracking_disabled context manager that can be used to disable tracking. This might come handy, for example during migrations:

from collective.behavior.lastmodifier.behavior import tracking_disabled

with tracking_disabled():
    ...

Installation

Install collective.behavior.lastmodifier by adding it to your buildout:

[buildout]

...

eggs =
    collective.behavior.lastmodifier

and then running bin/buildout

Contribute

License

The project is licensed under the GPLv2.