此包允许管理员标记无法删除的对象
项目描述
collective.preventactions
此包允许管理员标记无法删除或重命名/移动的对象。
版本
版本 > 3 适用于Plone 5.2和Python 3
版本 < 3 与Archetypes (分支 2.x) 兼容
工作原理
此包使用标记接口并订阅 IObjectWillBeRemovedEvent 和 IObjectWillBeMovedEvent 事件。如果在修改后的对象上找到标记接口,将引发异常。
您也可以在您的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 查看哈希值)
关闭
collective.preventactions-0.3.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | f7b902993219f04667bd43a3b8e7a328267226768b01a5eee422bd7ceadd4ef0 |
|
MD5 | 09ec06b53300dbf1c13795cb18c6e18c |
|
BLAKE2b-256 | 568543e853de98c24440f7fa5b5a7b6f1ec2443c1e28ce61d8f2e327ff5a2b66 |