Commit 0947e7fd authored by Hanno Schlichting's avatar Hanno Schlichting

Remove MessageDialog return values from CopySupport.

parent 05c6a413
......@@ -32,7 +32,7 @@ Restructuring
- Remove property management ZMI screens.
- Remove ZMI copy/cut/paste and re-ordering features.
- Remove ZMI copy/cut/paste/rename and re-ordering features.
- Drop `OFS.History` functionality.
......
This diff is collapsed.
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Rename Items',
)">
<dtml-if expr="REQUEST.has_key('ids')">
<form action="<dtml-var "REQUEST.URL1" html_quote>" method="post">
<table border="0">
<dtml-in expr="manage_CopyContainerAllItems(REQUEST)">
<tr>
<td align="left" valign="bottom" width="16"></td>
<td align="left" valign="bottom">
<div class="form-text">
&dtml-id;
</div>
</td>
<td align="left" valign="bottom">
<dtml-if cb_isMoveable>
<span class="form-text">to:</span>
<input type="hidden" name="ids:list" value="&dtml-id;" />
<input type="text" name="new_ids:list" size="<dtml-var "_.max(40,_.len(getId())+4)">" value="&dtml-id;" />
<dtml-else>
<span class="form-text">
may not be renamed.
</span>
</dtml-if>
</td>
</tr>
</dtml-in>
<tr>
<td></td>
<td colspan="2">
<div class="form-element">
<input class="form-element" type="hidden" name=":default_method"
value="manage_renameObjects" />
<input class="form-element" type="submit" name="manage_renameObjects:method"
value=" Ok " />
<input class="form-element" type="submit" name="manage_main:method"
value="Cancel" />
</div>
</td>
</tr>
</table>
</form>
<dtml-else>
<form action="manage_main" method="get">
<p align="center">
<br /><br />
<span class="form-text">
You must select an item to rename.
</span>
<br /><br />
<input class="form-element" type="submit" name="submit" value=" Ok " />
</p>
</form>
</dtml-if>
<dtml-var manage_page_footer>
......@@ -597,8 +597,6 @@ class ICopyContainer(Interface):
argument.
"""
manage_renameForm = Attribute("""Rename management view""")
def manage_renameObjects(ids=[], new_ids=[], REQUEST=None):
"""Rename several sub-objects"""
......
......@@ -334,21 +334,15 @@ class TestCopySupportSecurity(CopySupportTestBase):
try:
callable(*args, **kw)
except CopyError as e:
if ce_regex is not None:
pattern = re.compile(ce_regex, re.DOTALL)
if pattern.search(e.args[0]) is None:
self.fail("Paste failed; didn't match pattern:\n%s" % e)
else:
self.fail("Paste failed; no pattern:\n%s" % e)
except Unauthorized:
pass
else:
self.fail("Paste allowed unexpectedly.")
......@@ -464,7 +458,7 @@ class TestCopySupportSecurity(CopySupportTestBase):
cookie = folder1.manage_cutObjects(ids=('file', ))
self._assertCopyErrorUnauth(
folder2.manage_pasteObjects, cookie,
ce_regex='Insufficient Privileges.*%s' % ADD_IMAGES_AND_FILES)
ce_regex='Insufficient privileges')
def test_move_cant_delete_source(self):
from AccessControl.Permissions import delete_objects
......@@ -481,4 +475,4 @@ class TestCopySupportSecurity(CopySupportTestBase):
cookie = folder1.manage_cutObjects(ids=('file', ))
self._assertCopyErrorUnauth(
folder2.manage_pasteObjects, cookie,
ce_regex='Insufficient Privileges.*%s' % delete_objects)
ce_regex='Insufficient privileges')
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