Skip to content

Commit

Permalink
Remove propertiestool import step and usage of portal_properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Jun 15, 2024
1 parent de6520f commit c247a7a
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 368 deletions.
4 changes: 0 additions & 4 deletions Products/CMFPlone/browser/author.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,7 @@ def home_folder(self, username):
return self.membership_tool.getHomeFolder(id=username)

def __call__(self):
self.portal_properties = getUtility(IPropertiesTool)

self.portal_catalog = getToolByName(self.context, "portal_catalog")

# XXX: getUtility call does not work.
self.membership_tool = getToolByName(self.context, "portal_membership")

self.portal_state = getMultiAdapter(
Expand Down
1 change: 0 additions & 1 deletion Products/CMFPlone/browser/templates/ajax_main_template.pt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
dummy python: plone_layout.mark_view(view);
portal_url python:portal_state.portal_url();
checkPermission python:context.restrictedTraverse('portal_membership').checkPermission;
site_properties python:context.restrictedTraverse('portal_properties').site_properties;
ajax_include_head python:request.get('ajax_include_head', False);
ajax_load python:False;"
i18n:domain="plone"
Expand Down
1 change: 0 additions & 1 deletion Products/CMFPlone/browser/templates/main_template.pt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
dummy python: plone_layout.mark_view(view);
portal_url python:portal_state.portal_url();
checkPermission python:context.restrictedTraverse('portal_membership').checkPermission;
site_properties python:context.restrictedTraverse('portal_properties').site_properties;
ajax_include_head python:request.get('ajax_include_head', False);
ajax_load python:False;"
i18n:domain="plone"
Expand Down
39 changes: 0 additions & 39 deletions Products/CMFPlone/exportimport/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,9 @@
<depends name="catalog" />
<depends name="viewlets" />
<depends name="controlpanel" />
<depends name="propertiestool" />
<depends name="workflow" />
</genericsetup:importStep>

<genericsetup:importStep
name="propertiestool"
title="Plone Properties"
description="Import plone properties tool and subobjects."
handler="Products.CMFPlone.exportimport.propertiestool.importPloneProperties"
>
<depends name="componentregistry" />
</genericsetup:importStep>

<genericsetup:importStep
name="update-workflow-rolemap"
title="Update workflow role mappings"
Expand Down Expand Up @@ -105,48 +95,19 @@
handler="Products.CMFPlone.exportimport.memberdata_properties.exportMemberDataProperties"
/>

<genericsetup:exportStep
name="propertiestool"
title="Plone Properties"
description="Export plone properties tool and subobjects."
handler="Products.CMFPlone.exportimport.propertiestool.exportPloneProperties"
/>

<genericsetup:exportStep
name="viewlets"
title="Viewlet Settings"
description="Export viewlet settings"
handler="plone.app.viewletmanager.exportimport.storage.exportViewletSettingsStorage"
/>

<adapter
factory=".propertiestool.PlonePropertiesToolXMLAdapter"
provides="Products.GenericSetup.interfaces.IBody"
for="plone.base.interfaces.IPropertiesTool
Products.GenericSetup.interfaces.ISetupEnviron"
/>

<adapter
factory=".propertiestool.SimpleItemWithPropertiesXMLAdapter"
provides="Products.GenericSetup.interfaces.IBody"
for="plone.base.interfaces.ISimpleItemWithProperties
Products.GenericSetup.interfaces.ISetupEnviron"
/>

<adapter
factory="Products.CMFCore.exportimport.content.StructureFolderWalkingAdapter"
provides="Products.GenericSetup.interfaces.IFilesystemImporter"
for="Products.CMFCore.interfaces.ISiteRoot"
/>

<adapter
factory=".propertiestool.SimpleItemWithPropertiesXMLAdapter"
provides="Products.GenericSetup.interfaces.IBody"
for="Products.CMFCore.interfaces.IMemberDataTool
Products.GenericSetup.interfaces.ISetupEnviron"
zcml:condition="not-installed Products.CMFCore.exportimport.memberdata"
/>

<adapter
factory=".controlpanel.ControlPanelXMLAdapter"
provides="Products.GenericSetup.interfaces.IBody"
Expand Down
140 changes: 0 additions & 140 deletions Products/CMFPlone/exportimport/propertiestool.py

This file was deleted.

95 changes: 0 additions & 95 deletions Products/CMFPlone/exportimport/tests/testPropertiesTool.py

This file was deleted.

3 changes: 0 additions & 3 deletions Products/CMFPlone/profiles/default/componentregistry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
<utility factory="plone.app.viewletmanager.storage.ViewletSettingsStorage"
interface="plone.app.viewletmanager.interfaces.IViewletSettingsStorage"
/>
<utility interface="Products.CMFCore.interfaces.IPropertiesTool"
object="portal_properties"
/>
<utility interface="Products.CMFCore.interfaces.ISiteRoot"
object=""
/>
Expand Down
15 changes: 0 additions & 15 deletions Products/CMFPlone/profiles/default/propertiestool.xml

This file was deleted.

3 changes: 0 additions & 3 deletions Products/CMFPlone/profiles/default/toolset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
<required class="Products.CMFPlone.PasswordResetTool.PasswordResetTool"
tool_id="portal_password_reset"
/>
<required class="Products.CMFPlone.PropertiesTool.PropertiesTool"
tool_id="portal_properties"
/>
<required class="Products.CMFPlone.RegistrationTool.RegistrationTool"
tool_id="portal_registration"
/>
Expand Down
23 changes: 0 additions & 23 deletions Products/CMFPlone/tests/testNavigationView.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,6 @@ def path(x):
self.assertEqual(subfolder221map["item"].getPath(), path(subfolder221))
self.assertEqual(len(subfolder221map["children"]), 0)

def testSitemapUnchangedWithTopLevel(self):
# Test that setting topLevel does not alter the sitemap
ntp = self.portal.portal_properties.navtree_properties
for topLevel in range(0, 5):
ntp.manage_changeProperties(topLevel=topLevel)
view = self.view_class(self.portal, self.request)
sitemap = view.siteMap()
self.assertEqual(
sitemap["children"][-1]["item"].getPath(), "/plone/folder2"
)

def testSitemapUnchangedWithBottomLevel(self):
# Test that setting bottomLevel does not alter the sitemap
ntp = self.portal.portal_properties.navtree_properties
for bottomLevel in range(0, 5):
ntp.manage_changeProperties(bottomLevel=bottomLevel)
view = self.view_class(self.portal, self.request)
sitemap = view.siteMap()
self.assertEqual(
sitemap["children"][-1]["item"].getPath(), "/plone/folder2"
)
self.assertTrue(len(sitemap["children"][-1]["children"]) > 0)

def testSitemapWithNavigationRoot(self):
self.navigation_settings.root = "/folder2"
view = self.view_class(self.portal, self.request)
Expand Down
Loading

0 comments on commit c247a7a

Please sign in to comment.