Skip to main content

This package allows administrateur to marker object which can't be deleted

Project description

https://travis-ci.org/collective/collective.preventactions.svg?branch=master https://coveralls.io/repos/collective/collective.preventactions/badge.svg?branch=master

collective.preventactions

This package allows administrateur to marker object which can’t be deleted or renamed/moved.

The map on a collection.

How it works

This package use marker interfaces and subscribe to IObjectWillBeRemovedEvent and IObjectWillBeMovedEvent events. If a marker interface is find on modified object, a exception will be raised.

You can also set some contents not deleteable (for example) like this in your setuphandler :

from collective.preventactions.interfaces import IPreventDelete
from plone import api
from zope.interface import alsoProvides


def post_install(context):
    obj = api.content.get('/Plone/content-not-deleteable')
    alsoProvides(obj, IPreventDelete)

Installation

To install collective.preventactions you simply add collective.preventactions to the list of eggs in your buildout, run buildout and restart Plone.

Then, install collective.preventactions using the Add-ons control panel.

License

The project is licensed under the GPLv2. Changelog =========

0.2.1 (2018-07-10)

  • Typo. [bsuttor]

0.2 (2018-07-09)

  • Fix check render of PreventActionForm. [bsuttor]

0.1 (2016-09-20)

  • Package created using mr.bob [bsuttor]

Project details


Download files

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

Files for collective.preventactions, version 0.2.1
Filename, size & hash File type Python version Upload date
collective.preventactions-0.2.1.tar.gz (39.4 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page