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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
04718353
Commit
04718353
authored
May 30, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "[erp5_web] Desactivate the portal_skin URL parameter on Static Web Section"
This reverts commit
7cc3d26d
.
parent
b9924f00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
19 deletions
+0
-19
bt5/erp5_web/DocumentTemplateItem/portal_components/document.erp5.StaticWebSection.py
...eItem/portal_components/document.erp5.StaticWebSection.py
+0
-16
bt5/erp5_web_ui_test/TestTemplateItem/portal_components/test.erp5.testStaticWebSiteRedirection.py
...rtal_components/test.erp5.testStaticWebSiteRedirection.py
+0
-3
No files found.
bt5/erp5_web/DocumentTemplateItem/portal_components/document.erp5.StaticWebSection.py
View file @
04718353
...
@@ -34,22 +34,11 @@ from OFS.Traversable import NotFound
...
@@ -34,22 +34,11 @@ from OFS.Traversable import NotFound
from
Products.ERP5.mixin.extensible_traversable
import
DocumentExtensibleTraversableMixin
from
Products.ERP5.mixin.extensible_traversable
import
DocumentExtensibleTraversableMixin
from
Products.ERP5.Document.WebSection
import
WebSection
from
Products.ERP5.Document.WebSection
import
WebSection
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type
import
Permissions
from
Persistence
import
Persistent
from
webdav.NullResource
import
NullResource
from
webdav.NullResource
import
NullResource
MARKER
=
[]
MARKER
=
[]
class
StaticWebSectionTraversalHook
(
Persistent
):
"""Traversal hook to change the skin selection for this websection.
"""
def
__call__
(
self
,
container
,
request
):
if
not
request
.
get
(
'ignore_layout'
,
None
):
# If a skin selection is defined in this web section, change the skin now.
skin_selection_name
=
container
.
getSkinSelectionName
()
if
skin_selection_name
:
# and request.get('portal_skin', None) is None:
container
.
getPortalObject
().
changeSkin
(
skin_selection_name
)
class
StaticWebSection
(
WebSection
):
class
StaticWebSection
(
WebSection
):
"""
"""
This Web Section only get resource from the DMS.
This Web Section only get resource from the DMS.
...
@@ -60,11 +49,6 @@ class StaticWebSection(WebSection):
...
@@ -60,11 +49,6 @@ class StaticWebSection(WebSection):
security
=
ClassSecurityInfo
()
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
def
_getTraversalHookClass
(
self
):
return
StaticWebSectionTraversalHook
_traversal_hook_class
=
StaticWebSectionTraversalHook
def
getExtensibleContent
(
self
,
request
,
name
):
def
getExtensibleContent
(
self
,
request
,
name
):
stack
=
request
[
'TraversalRequestNameStack'
]
stack
=
request
[
'TraversalRequestNameStack'
]
...
...
bt5/erp5_web_ui_test/TestTemplateItem/portal_components/test.erp5.testStaticWebSiteRedirection.py
View file @
04718353
...
@@ -170,9 +170,6 @@ class TestStaticWebSectionRedirection(ERP5TypeTestCase):
...
@@ -170,9 +170,6 @@ class TestStaticWebSectionRedirection(ERP5TypeTestCase):
def
test_queryStringIgnoreLayout
(
self
):
def
test_queryStringIgnoreLayout
(
self
):
self
.
runTestRedirect
(
"?ignore_layout=1"
)
self
.
runTestRedirect
(
"?ignore_layout=1"
)
def
test_queryStringPortalSkin
(
self
):
self
.
runTestRedirect
(
"?portal_skin=FOOBAR"
)
def
test_plainRedirectGetId
(
self
):
def
test_plainRedirectGetId
(
self
):
self
.
runTestRedirect
(
"getId"
)
self
.
runTestRedirect
(
"getId"
)
...
...
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