Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
0947e7fd
Commit
0947e7fd
authored
Aug 28, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove MessageDialog return values from CopySupport.
parent
05c6a413
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
233 deletions
+24
-233
CHANGES.rst
CHANGES.rst
+1
-1
src/OFS/CopySupport.py
src/OFS/CopySupport.py
+21
-160
src/OFS/dtml/renameForm.dtml
src/OFS/dtml/renameForm.dtml
+0
-62
src/OFS/interfaces.py
src/OFS/interfaces.py
+0
-2
src/OFS/tests/testCopySupport.py
src/OFS/tests/testCopySupport.py
+2
-8
No files found.
CHANGES.rst
View file @
0947e7fd
...
...
@@ -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.
...
...
src/OFS/CopySupport.py
View file @
0947e7fd
This diff is collapsed.
Click to expand it.
src/OFS/dtml/renameForm.dtml
deleted
100644 → 0
View file @
05c6a413
<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>
src/OFS/interfaces.py
View file @
0947e7fd
...
...
@@ -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"""
...
...
src/OFS/tests/testCopySupport.py
View file @
0947e7fd
...
...
@@ -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'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment