跳转到主要内容

此包允许管理员标记无法删除的对象

项目描述

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

collective.preventactions

此包允许管理员标记无法删除或重命名/移动的对象。

The map on a collection.

版本

  • 版本 > 3 适用于Plone 5.2和Python 3

  • 版本 < 3 与Archetypes (分支 2.x) 兼容

工作原理

此包使用标记接口并订阅 IObjectWillBeRemovedEventIObjectWillBeMovedEvent 事件。如果在修改后的对象上找到标记接口,将引发异常。

您也可以在您的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)

安装

要安装 collective.preventactions,只需将 collective.preventactions 添加到您的buildout中的egg列表中,运行buildout并重启Plone。

然后,使用附加组件控制面板安装 collective.preventactions

许可证

该项目在GPLv2下授权。更改日志 =========

0.3.0 (2019-11-26)

  • 删除Archetypes依赖。 [bsuttor]

0.2.1 (2018-07-10)

  • 错别字。 [bsuttor]

0.2 (2018-07-09)

  • 修复PreventActionForm的检查渲染。 [bsuttor]

0.1 (2016-09-20)

  • 使用mr.bob创建的包 [bsuttor]

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

collective.preventactions-0.3.0.tar.gz (39.5 kB 查看哈希值)

上传时间

支持