Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
ac95cf57
Commit
ac95cf57
authored
May 17, 2016
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "website: do not accumulate before traversal hook when cloning web sites"
This reverts commit
bd89a732
.
parent
bd89a732
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
39 deletions
+0
-39
product/ERP5/Document/WebSite.py
product/ERP5/Document/WebSite.py
+0
-12
product/ERP5/tests/testERP5Web.py
product/ERP5/tests/testERP5Web.py
+0
-27
No files found.
product/ERP5/Document/WebSite.py
View file @
ac95cf57
...
@@ -201,18 +201,6 @@ class WebSite(WebSection):
...
@@ -201,18 +201,6 @@ class WebSite(WebSection):
BeforeTraverse
.
registerBeforeTraverse
(
item
,
WebSiteTraversalHook
(),
handle
)
BeforeTraverse
.
registerBeforeTraverse
(
item
,
WebSiteTraversalHook
(),
handle
)
WebSection
.
manage_afterAdd
(
self
,
item
,
container
)
WebSection
.
manage_afterAdd
(
self
,
item
,
container
)
security
.
declarePrivate
(
'manage_afterClone'
)
def
manage_afterClone
(
self
,
item
):
# unregister all before traversal hooks that do not belong to us.
my_handle
=
self
.
meta_type
+
'/'
+
self
.
getId
()
handle_to_unregister_list
=
[]
for
priority
,
handle
in
self
.
__before_traverse__
.
keys
():
if
handle
!=
my_handle
:
handle_to_unregister_list
.
append
(
handle
)
for
handle
in
handle_to_unregister_list
:
BeforeTraverse
.
unregisterBeforeTraverse
(
self
,
handle
)
WebSection
.
manage_afterClone
(
self
,
item
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getPermanentURLList'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getPermanentURLList'
)
def
getPermanentURLList
(
self
,
document
):
def
getPermanentURLList
(
self
,
document
):
"""
"""
...
...
product/ERP5/tests/testERP5Web.py
View file @
ac95cf57
...
@@ -169,33 +169,6 @@ class TestERP5Web(ERP5TypeTestCase):
...
@@ -169,33 +169,6 @@ class TestERP5Web(ERP5TypeTestCase):
except
:
except
:
self
.
fail
(
'Cataloging of the Web Site failed.'
)
self
.
fail
(
'Cataloging of the Web Site failed.'
)
def
test_WebSiteTraversalHook_on_newContent
(
self
):
"""a WebSiteTraversalHook is added on websites automatically.
"""
web_site
=
self
.
portal
.
web_site_module
.
newContent
(
portal_type
=
'Web Site'
,
)
self
.
assertEquals
(
1
,
len
(
web_site
.
__before_traverse__
))
def
test_WebSiteTraversalHook_on_clone
(
self
):
"""a WebSiteTraversalHook is correctly updated after cloning a website.
"""
web_site
=
self
.
portal
.
web_site_module
.
newContent
(
portal_type
=
'Web Site'
,
)
cloned_web_site
=
web_site
.
Base_createCloneDocument
(
batch_mode
=
True
)
self
.
assertEquals
(
1
,
len
(
cloned_web_site
.
__before_traverse__
))
def
test_WebSiteTraversalHook_on_change_id
(
self
):
"""a WebSiteTraversalHook is correctly updated after changing website id.
"""
web_site
=
self
.
portal
.
web_site_module
.
newContent
(
portal_type
=
'Web Site'
,
)
self
.
tic
()
web_site
.
setId
(
"new_id"
)
self
.
assertEquals
(
1
,
len
(
web_site
.
__before_traverse__
))
def
test_02_EditSimpleWebPage
(
self
):
def
test_02_EditSimpleWebPage
(
self
):
"""
"""
Simple Case of creating a web page.
Simple Case of creating a web page.
...
...
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