Commit 205b5b70 authored by Lennart Regebro's avatar Lennart Regebro

Collector #391: Cut and paste now requires delete permissions.

parent 9c75b0c7
...@@ -29,6 +29,7 @@ Zope Changes ...@@ -29,6 +29,7 @@ Zope Changes
(such as storages, databases, or logging handlers) to be used. (such as storages, databases, or logging handlers) to be used.
Bugs fixed Bugs fixed
- Collector #391: Cut and paste now requires delete permissions.
- Collector #331: Referenses to URL in manage_tabs was changed - Collector #331: Referenses to URL in manage_tabs was changed
to REQUEST.URL to prevent accidental overriding. to REQUEST.URL to prevent accidental overriding.
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
############################################################################## ##############################################################################
__doc__="""Copy interface""" __doc__="""Copy interface"""
__version__='$Revision: 1.86 $'[11:-2] __version__='$Revision: 1.87 $'[11:-2]
import sys, Globals, Moniker, tempfile, ExtensionClass import sys, Globals, Moniker, tempfile, ExtensionClass
from marshal import loads, dumps from marshal import loads, dumps
...@@ -32,8 +32,10 @@ class CopyContainer(ExtensionClass.Base): ...@@ -32,8 +32,10 @@ class CopyContainer(ExtensionClass.Base):
__ac_permissions__=( __ac_permissions__=(
('View management screens', ('View management screens',
('manage_cutObjects', 'manage_copyObjects', 'manage_pasteObjects', ('manage_copyObjects', 'manage_pasteObjects',
'manage_renameForm', 'manage_renameObject', 'manage_renameObjects',)), 'manage_renameForm', 'manage_renameObject', 'manage_renameObjects',)),
('Delete objects',
('manage_cutObjects')),
) )
......
...@@ -224,17 +224,19 @@ function toggleSelect() { ...@@ -224,17 +224,19 @@ function toggleSelect() {
<dtml-unless dontAllowCopyAndPaste> <dtml-unless dontAllowCopyAndPaste>
<input class="form-element" type="submit" name="manage_renameForm:method" <input class="form-element" type="submit" name="manage_renameForm:method"
value="Rename" /> value="Rename" />
<input class="form-element" type="submit" name="manage_cutObjects:method" <dtml-if "_.SecurityCheckPermission('Delete objects',this())">
value="Cut" /> <input class="form-element" type="submit" name="manage_cutObjects:method"
<input class="form-element" type="submit" name="manage_copyObjects:method" value="Cut" />
</dtml-if>
<input class="form-element" type="submit" name="manage_copyObjects:method"
value="Copy" /> value="Copy" />
<dtml-if cb_dataValid> <dtml-if cb_dataValid>
<input class="form-element" type="submit" name="manage_pasteObjects:method" <input class="form-element" type="submit" name="manage_pasteObjects:method"
value="Paste" /> value="Paste" />
</dtml-if> </dtml-if>
</dtml-unless> </dtml-unless>
<dtml-if "_.SecurityCheckPermission('Delete objects',this())"> <dtml-if "_.SecurityCheckPermission('Delete objects',this())">
<input class="form-element" type="submit" name="manage_delObjects:method" <input class="form-element" type="submit" name="manage_delObjects:method"
value="Delete" /> value="Delete" />
</dtml-if> </dtml-if>
<dtml-if "_.SecurityCheckPermission('Import/Export objects', this())"> <dtml-if "_.SecurityCheckPermission('Import/Export objects', this())">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment