Commit 09453793 authored by 's avatar

Fixed bug that allowed non-deletable objects to be effectively deleted by

cutting and pasting them.
parent e0ae6e32
"""Copy interface""" """Copy interface"""
__version__='$Revision: 1.15 $'[11:-2] __version__='$Revision: 1.16 $'[11:-2]
import Globals, Moniker, rPickle, tempfile import Globals, Moniker, rPickle, tempfile
from cPickle import loads, dumps from cPickle import loads, dumps
...@@ -77,8 +77,11 @@ class CopyContainer: ...@@ -77,8 +77,11 @@ class CopyContainer:
# Check for special object! # Check for special object!
try: r=obj.aq_parent._reserved_names try: r=obj.aq_parent._reserved_names
except: r=() except: r=()
if prev_id in special: if prev_id in r:
raise 'NotSupported', eNotSupported raise 'NotSupported', Globals.MessageDialog(
title='Not Supported',
message='This item cannot be cut and pasted',
action ='manage_main')
obj.aq_parent._delObject(prev_id) obj.aq_parent._delObject(prev_id)
if hasattr(obj, 'aq_base'): if hasattr(obj, 'aq_base'):
......
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