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
359613a7
Commit
359613a7
authored
Sep 12, 2011
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert part of c122071 and always get a VHM back
parent
f4da03d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
src/OFS/Application.py
src/OFS/Application.py
+11
-0
src/OFS/tests/testAppInitializer.py
src/OFS/tests/testAppInitializer.py
+9
-0
src/webdav/tests/testPUT_factory.py
src/webdav/tests/testPUT_factory.py
+3
-2
No files found.
src/OFS/Application.py
View file @
359613a7
...
...
@@ -213,6 +213,7 @@ class AppInitializer:
self
.
install_inituser
()
self
.
install_products
()
self
.
install_standards
()
self
.
install_virtual_hosting
()
def
install_cp_and_products
(
self
):
global
APP_MANAGER
...
...
@@ -266,6 +267,16 @@ class AppInitializer:
transaction
.
get
().
note
(
'Migrated user folder'
)
transaction
.
commit
()
def
install_virtual_hosting
(
self
):
app
=
self
.
getApp
()
if
'virtual_hosting'
not
in
app
:
from
Products.SiteAccess.VirtualHostMonster
\
import
VirtualHostMonster
vhm
=
VirtualHostMonster
()
vhm
.
id
=
'virtual_hosting'
vhm
.
addToContainer
(
app
)
self
.
commit
(
'Added virtual_hosting'
)
def
install_products
(
self
):
return
install_products
()
...
...
src/OFS/tests/testAppInitializer.py
View file @
359613a7
...
...
@@ -99,6 +99,15 @@ class TestInitialization( unittest.TestCase ):
self
.
assertTrue
(
hasattr
(
app
,
'Control_Panel'
))
self
.
assertEqual
(
app
.
Control_Panel
.
meta_type
,
'Control Panel'
)
def
test_install_virtual_hosting
(
self
):
self
.
configure
(
good_cfg
)
i
=
self
.
getOne
()
i
.
install_virtual_hosting
()
app
=
i
.
getApp
()
self
.
assertTrue
(
'virtual_hosting'
in
app
)
self
.
assertEqual
(
app
.
virtual_hosting
.
meta_type
,
'Virtual Host Monster'
)
def
test_install_required_roles
(
self
):
self
.
configure
(
good_cfg
)
i
=
self
.
getOne
()
...
...
src/webdav/tests/testPUT_factory.py
View file @
359613a7
...
...
@@ -21,8 +21,9 @@ class TestPUTFactory(unittest.TestCase):
self
.
app
.
manage_addFolder
(
'folder'
,
''
)
self
.
folder
=
self
.
app
.
folder
# Setup VHM
vhm
=
VirtualHostMonster
()
vhm
.
addToContainer
(
self
.
app
)
if
'virtual_hosting'
not
in
self
.
app
:
vhm
=
VirtualHostMonster
()
vhm
.
addToContainer
(
self
.
app
)
# Fake a WebDAV PUT request
request
=
self
.
app
.
REQUEST
request
[
'PARENTS'
]
=
[
self
.
app
]
...
...
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