The default Plone permission for deleting content does not allow to delete content from a folder without being able to delete the folder itself.
The collective.deletepermission package introduces an additional permission
Delete portal content. By seperating the permission
content (I can delete this content object) from the permission
objects (I can delete something IN this folder), we now can allow a
Contributor to delete content he created (
Owner role) without letting
him delete folders and objects belonging to other users - even in a nested
This package monkey patches:
manage_delObjectsof AT BaseFolder and Dexterity Container
manage_cutObjects__roles__of AT BaseFolderMixin and Dexterity Container
manage_pasteObjects__roles__of AT BaseFolderMixin and Dexterity Container
cb_userHasCopyOrMovePermissionchecksof OFS CopySupport
and overrides the following templates and scripts (skins):
to implement a new
Delete portal content permission.
Delete portal content permission is now required on the object you want
On parent objects the
Delete objects permission is still required.
This gives us some more flexibility and makes it possible for a contributor to
delete his own content but nothing else. On the graph below you can see the
situation with the default permission settings and if it is deletable by
- Rootfolder of Admin (not deletable) '- Document of Contributor1 (deletable) '- Subfolder of Admin (not deletable) '- Document of Contributor1 (deletable) '- Document of Contrubutor2 (not deletable)
In default Plone this would look like this:
- Rootfolder of Admin (not deletable) '- Document of Contributor1 (deletable) '- Subfolder of Admin (deletable) '- Document of Contributor1 (deletable) '- Document of Contrubutor2 (deletable)
This is caused by the fact that in default Plone we require the same permission on the parent and the object. If we have two levels where we should be able to delete some files, we always end up with the user being able to delete the container of the second level.
collective.deletepermissionto your buildout configuration:
[instance] eggs += collective.deletepermission
- Install the generic setup import profile.
- Github: https://github.com/4teamwork/collective.deletepermission
- Issues: https://github.com/4teamwork/collective.deletepermission/issues
- Pypi: http://pypi.python.org/pypi/collective.deletepermission
- Continuous integration: https://jenkins.4teamwork.ch/search?q=collective.deletepermission
This package is copyright by 4teamwork.
collective.deletepermission is licensed under GNU General Public License,