Skip to content

Commit

Permalink
[fc] Repository: Products.CMFEditions
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2023-07-31T19:17:50+03:00
Author: Alin Voinea (avoinea) <[email protected]>
Commit: plone/Products.CMFEditions@c80bc31

Allow principal in sys_metadata with ArchivistTool init

Files changed:
M Products/CMFEditions/ArchivistTool.py
Repository: Products.CMFEditions

Branch: refs/heads/master
Date: 2023-07-31T19:20:04+03:00
Author: Alin Voinea (avoinea) <[email protected]>
Commit: plone/Products.CMFEditions@5d0fe68

Update CHANGELOG

Files changed:
A news/101.bugfix
Repository: Products.CMFEditions

Branch: refs/heads/master
Date: 2023-10-04T15:34:51+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: plone/Products.CMFEditions@6e4cade

Merge pull request #101 from plone/principal-fix

Allow principal in sys_metadata with ArchivistTool init

Files changed:
A news/101.bugfix
M Products/CMFEditions/ArchivistTool.py
  • Loading branch information
jensens committed Oct 4, 2023
1 parent f7f89c1 commit af54fba
Showing 1 changed file with 22 additions and 38 deletions.
60 changes: 22 additions & 38 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,48 @@
Repository: Products.CMFPlone
Repository: Products.CMFEditions


Branch: refs/heads/master
Date: 2023-07-30T22:46:54+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/c5da33b889164bb931ee3780798802654e0feec0
Date: 2023-07-31T19:17:50+03:00
Author: Alin Voinea (avoinea) <[email protected]>
Commit: https://github.com/plone/Products.CMFEditions/commit/c80bc31af46bff45fee2908878b1f01190fda8d8

fix deprecated import from `plone.app.z3cform`
Allow principal in sys_metadata with ArchivistTool init

Files changed:
M Products/CMFPlone/controlpanel/browser/syndication.py
M Products/CMFEditions/ArchivistTool.py

b'diff --git a/Products/CMFPlone/controlpanel/browser/syndication.py b/Products/CMFPlone/controlpanel/browser/syndication.py\nindex a34305772e..7a048f5950 100644\n--- a/Products/CMFPlone/controlpanel/browser/syndication.py\n+++ b/Products/CMFPlone/controlpanel/browser/syndication.py\n@@ -1,5 +1,5 @@\n from plone.app.registry.browser import controlpanel\n-from plone.app.z3cform.widget import SelectFieldWidget\n+from plone.app.z3cform.widgets.select import Select2FieldWidget\n from plone.base.interfaces.syndication import ISiteSyndicationSettings\n from Products.CMFCore.utils import getToolByName\n from Products.statusmessages.interfaces import IStatusMessage\n@@ -17,7 +17,7 @@ class SyndicationControlPanelForm(controlpanel.RegistryEditForm):\n \n def updateFields(self):\n super().updateFields()\n- self.fields["site_rss_items"].widgetFactory = SelectFieldWidget\n+ self.fields["site_rss_items"].widgetFactory = Select2FieldWidget\n \n def getSyndicationSettingsButtonShown(self):\n actions = getToolByName(self.context, "portal_actions")\n'
b'diff --git a/Products/CMFEditions/ArchivistTool.py b/Products/CMFEditions/ArchivistTool.py\nindex 3725cd7..30bd7ba 100644\n--- a/Products/CMFEditions/ArchivistTool.py\n+++ b/Products/CMFEditions/ArchivistTool.py\n@@ -455,7 +455,7 @@ def __init__(\n sys_metadata["comment"] = sys_metadata.get("comment", "")\n sys_metadata["timestamp"] = sys_metadata.get("timestamp", int(time.time()))\n sys_metadata["originator"] = sys_metadata.get("originator", None)\n- sys_metadata["principal"] = getUserId()\n+ sys_metadata["principal"] = sys_metadata.get("principal", getUserId())\n sys_metadata["approxSize"] = approxSize\n sys_metadata["parent"] = {\n "history_id": portal_uidhandler.register(parent),\n'

Repository: Products.CMFPlone
Repository: Products.CMFEditions


Branch: refs/heads/master
Date: 2023-07-30T23:03:17+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/3957b0359058cb3fb2732d06b1d9b7bff26295d8
Date: 2023-07-31T19:20:04+03:00
Author: Alin Voinea (avoinea) <[email protected]>
Commit: https://github.com/plone/Products.CMFEditions/commit/5d0fe680f05ece30c4a0c940bf4aa99704c28a6e

fix deprecated import from `plone.app.layout`
Update CHANGELOG

Files changed:
M Products/CMFPlone/patterns/tinymce.py
A news/101.bugfix

b'diff --git a/Products/CMFPlone/patterns/tinymce.py b/Products/CMFPlone/patterns/tinymce.py\nindex 9eeef14dab..27d569ef83 100644\n--- a/Products/CMFPlone/patterns/tinymce.py\n+++ b/Products/CMFPlone/patterns/tinymce.py\n@@ -1,8 +1,8 @@\n from lxml import html\n-from plone.app.layout.navigation.root import getNavigationRootObject\n from plone.app.theming.utils import theming_policy\n from plone.base.interfaces import IFilterSchema\n from plone.base.interfaces import ITinyMCESchema\n+from plone.base.navigationroot import get_navigation_root_object\n from plone.base.utils import safe_text\n from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n@@ -22,7 +22,7 @@ def __init__(self, context, request):\n self.filter_settings = getUtility(IRegistry).forInterface(\n IFilterSchema, prefix="plone", check=False\n )\n- self.nav_root = getNavigationRootObject(\n+ self.nav_root = get_navigation_root_object(\n self.context,\n get_portal(),\n )\n'
b'diff --git a/news/101.bugfix b/news/101.bugfix\nnew file mode 100644\nindex 00000000..b797257f\n--- /dev/null\n+++ b/news/101.bugfix\n@@ -0,0 +1 @@\n+Allow principal in sys_metadata with ArchivistTool init\n'

Repository: Products.CMFPlone
Repository: Products.CMFEditions


Branch: refs/heads/master
Date: 2023-07-30T23:03:24+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/51c3be932109c2608b2f172abf5c9f1e86013e2c

changenote

Files changed:
A news/3830.bugfix

b'diff --git a/news/3830.bugfix b/news/3830.bugfix\nnew file mode 100644\nindex 0000000000..5375b8e25f\n--- /dev/null\n+++ b/news/3830.bugfix\n@@ -0,0 +1,2 @@\n+Fix deprecated imports.\n+[petschki]\n'

Repository: Products.CMFPlone


Branch: refs/heads/master
Date: 2023-10-04T14:57:56+02:00
Date: 2023-10-04T15:34:51+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/9ae85658982c1c97755a2ec1bf65dba712d8f986
Commit: https://github.com/plone/Products.CMFEditions/commit/6e4cade848fabc2c304a742628b86dcda9b2f9ed

Merge pull request #3830 from plone/paz3cform-import-fix
Merge pull request #101 from plone/principal-fix

Fix deprecated imports
Allow principal in sys_metadata with ArchivistTool init

Files changed:
A news/3830.bugfix
M Products/CMFPlone/controlpanel/browser/syndication.py
M Products/CMFPlone/patterns/tinymce.py
A news/101.bugfix
M Products/CMFEditions/ArchivistTool.py

b'diff --git a/Products/CMFPlone/controlpanel/browser/syndication.py b/Products/CMFPlone/controlpanel/browser/syndication.py\nindex a34305772e..7a048f5950 100644\n--- a/Products/CMFPlone/controlpanel/browser/syndication.py\n+++ b/Products/CMFPlone/controlpanel/browser/syndication.py\n@@ -1,5 +1,5 @@\n from plone.app.registry.browser import controlpanel\n-from plone.app.z3cform.widget import SelectFieldWidget\n+from plone.app.z3cform.widgets.select import Select2FieldWidget\n from plone.base.interfaces.syndication import ISiteSyndicationSettings\n from Products.CMFCore.utils import getToolByName\n from Products.statusmessages.interfaces import IStatusMessage\n@@ -17,7 +17,7 @@ class SyndicationControlPanelForm(controlpanel.RegistryEditForm):\n \n def updateFields(self):\n super().updateFields()\n- self.fields["site_rss_items"].widgetFactory = SelectFieldWidget\n+ self.fields["site_rss_items"].widgetFactory = Select2FieldWidget\n \n def getSyndicationSettingsButtonShown(self):\n actions = getToolByName(self.context, "portal_actions")\ndiff --git a/Products/CMFPlone/patterns/tinymce.py b/Products/CMFPlone/patterns/tinymce.py\nindex 9eeef14dab..27d569ef83 100644\n--- a/Products/CMFPlone/patterns/tinymce.py\n+++ b/Products/CMFPlone/patterns/tinymce.py\n@@ -1,8 +1,8 @@\n from lxml import html\n-from plone.app.layout.navigation.root import getNavigationRootObject\n from plone.app.theming.utils import theming_policy\n from plone.base.interfaces import IFilterSchema\n from plone.base.interfaces import ITinyMCESchema\n+from plone.base.navigationroot import get_navigation_root_object\n from plone.base.utils import safe_text\n from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n@@ -22,7 +22,7 @@ def __init__(self, context, request):\n self.filter_settings = getUtility(IRegistry).forInterface(\n IFilterSchema, prefix="plone", check=False\n )\n- self.nav_root = getNavigationRootObject(\n+ self.nav_root = get_navigation_root_object(\n self.context,\n get_portal(),\n )\ndiff --git a/news/3830.bugfix b/news/3830.bugfix\nnew file mode 100644\nindex 0000000000..5375b8e25f\n--- /dev/null\n+++ b/news/3830.bugfix\n@@ -0,0 +1,2 @@\n+Fix deprecated imports.\n+[petschki]\n'
b'diff --git a/Products/CMFEditions/ArchivistTool.py b/Products/CMFEditions/ArchivistTool.py\nindex 3725cd70..30bd7ba5 100644\n--- a/Products/CMFEditions/ArchivistTool.py\n+++ b/Products/CMFEditions/ArchivistTool.py\n@@ -455,7 +455,7 @@ def __init__(\n sys_metadata["comment"] = sys_metadata.get("comment", "")\n sys_metadata["timestamp"] = sys_metadata.get("timestamp", int(time.time()))\n sys_metadata["originator"] = sys_metadata.get("originator", None)\n- sys_metadata["principal"] = getUserId()\n+ sys_metadata["principal"] = sys_metadata.get("principal", getUserId())\n sys_metadata["approxSize"] = approxSize\n sys_metadata["parent"] = {\n "history_id": portal_uidhandler.register(parent),\ndiff --git a/news/101.bugfix b/news/101.bugfix\nnew file mode 100644\nindex 00000000..b797257f\n--- /dev/null\n+++ b/news/101.bugfix\n@@ -0,0 +1 @@\n+Allow principal in sys_metadata with ArchivistTool init\n'

0 comments on commit af54fba

Please sign in to comment.