-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/master Date: 2024-10-15T22:21:08-07:00 Author: Wesley Barroso Lopes (wesleybl) <[email protected]> Commit: plone/Products.CMFPlone@9a1a62b Avoid POSKeyError when commit occurs and we have savepoint that involves (#4026) Plone Site When ZODB handles savepoint and we have changes in Plone Site at that savepoint, it changes the `_p_estimated_size` attribute of Plone Site. This is an assignment to one of the special persistency attributes (identified by an _p_ name prefix); it should happen without access to any other attributes of obj. But obj._tree is accessed in __setattr__ of PloneSite class and results in a ZODB load which apparently fails. See: plone/plone.restapi#1823 (comment) Co-authored-by: Rohan Shaw <[email protected]> Files changed: A news/4026.bugfix M Products/CMFPlone/Portal.py
- Loading branch information
Showing
1 changed file
with
21 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,35 +2,28 @@ Repository: Products.CMFPlone | |
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-10-13T16:29:58+02:00 | ||
Author: jackahl (jackahl) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/cf0c46038eddbeff4e9e87c5a03df93ce1789e3a | ||
|
||
move all permissions for controlpanels to unifed file | ||
|
||
Files changed: | ||
A news/4028.bugfix | ||
M Products/CMFPlone/controlpanel/browser/configure.zcml | ||
M Products/CMFPlone/controlpanel/permissions.zcml | ||
|
||
b'diff --git a/Products/CMFPlone/controlpanel/browser/configure.zcml b/Products/CMFPlone/controlpanel/browser/configure.zcml\nindex 1a8231c590..7cca9f0b3a 100644\n--- a/Products/CMFPlone/controlpanel/browser/configure.zcml\n+++ b/Products/CMFPlone/controlpanel/browser/configure.zcml\n@@ -4,18 +4,6 @@\n xmlns:zcml="http://namespaces.zope.org/zcml"\n >\n \n- <permission\n- id="plone.app.controlpanel.Imaging"\n- title="Plone Site Setup: Imaging"\n- />\n-\n- <permission\n- id="plone.app.controlpanel.TinyMCE"\n- title="Plone Site Setup: TinyMCE"\n- >\n- <role name="Manager" />\n- </permission>\n-\n <!-- Control Panel Main Template -->\n <browser:page\n name="prefs_main_template"\n@@ -325,16 +313,6 @@\n permission="cmf.ManagePortal"\n />\n \n- <permission\n- id="Products.CMFPlone.ManagePortalAliases"\n- title="Manage Portal Aliases"\n- />\n-\n- <permission\n- id="Products.CMFPlone.ManageContextAliases"\n- title="Manage Context Aliases"\n- />\n-\n <browser:page\n name="redirection-controlpanel"\n for="plone.base.interfaces.IPloneSiteRoot"\ndiff --git a/Products/CMFPlone/controlpanel/permissions.zcml b/Products/CMFPlone/controlpanel/permissions.zcml\nindex be7eda7479..a701cf634b 100644\n--- a/Products/CMFPlone/controlpanel/permissions.zcml\n+++ b/Products/CMFPlone/controlpanel/permissions.zcml\n@@ -67,4 +67,26 @@\n <role name="Manager" />\n </permission>\n \n+ <permission\n+ id="plone.app.controlpanel.Imaging"\n+ title="Plone Site Setup: Imaging"\n+ />\n+\n+ <permission\n+ id="plone.app.controlpanel.TinyMCE"\n+ title="Plone Site Setup: TinyMCE"\n+ >\n+ <role name="Manager" />\n+ </permission>\n+\n+ <permission\n+ id="Products.CMFPlone.ManagePortalAliases"\n+ title="Manage Portal Aliases"\n+ />\n+\n+ <permission\n+ id="Products.CMFPlone.ManageContextAliases"\n+ title="Manage Context Aliases"\n+ />\n+\n </configure>\ndiff --git a/news/4028.bugfix b/news/4028.bugfix\nnew file mode 100644\nindex 0000000000..d0916ccdf0\n--- /dev/null\n+++ b/news/4028.bugfix\n@@ -0,0 +1,2 @@\n+move all permission definitions for controlpanels to unifed file from controlpanel directory\n+[jackahl]\n' | ||
|
||
Repository: Products.CMFPlone | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-10-13T23:05:35+02:00 | ||
Author: Gil Forcada Codinachs (gforcada) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/f7f0b19197da7917db154cbb383bede97e1a90a7 | ||
|
||
Merge pull request #4030 from plone/cp-permissions | ||
|
||
move all permissions for controlpanels to unifed file | ||
Date: 2024-10-15T22:21:08-07:00 | ||
Author: Wesley Barroso Lopes (wesleybl) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/9a1a62bb0ed4b208d303748700a5d0a126bd21d2 | ||
|
||
Avoid POSKeyError when commit occurs and we have savepoint that involves (#4026) | ||
|
||
Plone Site | ||
|
||
When ZODB handles savepoint and we have changes in Plone Site at that | ||
savepoint, it changes the `_p_estimated_size` attribute of Plone Site. | ||
This is an assignment to one of the special persistency attributes | ||
(identified by an _p_ name prefix); it should happen without access to | ||
any other attributes of obj. But obj._tree is accessed in __setattr__ of | ||
PloneSite class and results in a ZODB load which apparently fails. | ||
|
||
See: https://github.com/plone/plone.restapi/pull/1823#issuecomment-2402855105 | ||
|
||
Co-authored-by: Rohan Shaw <[email protected]> | ||
|
||
Files changed: | ||
A news/4028.bugfix | ||
M Products/CMFPlone/controlpanel/browser/configure.zcml | ||
M Products/CMFPlone/controlpanel/permissions.zcml | ||
A news/4026.bugfix | ||
M Products/CMFPlone/Portal.py | ||
|
||
b'diff --git a/Products/CMFPlone/controlpanel/browser/configure.zcml b/Products/CMFPlone/controlpanel/browser/configure.zcml\nindex 1a8231c590..7cca9f0b3a 100644\n--- a/Products/CMFPlone/controlpanel/browser/configure.zcml\n+++ b/Products/CMFPlone/controlpanel/browser/configure.zcml\n@@ -4,18 +4,6 @@\n xmlns:zcml="http://namespaces.zope.org/zcml"\n >\n \n- <permission\n- id="plone.app.controlpanel.Imaging"\n- title="Plone Site Setup: Imaging"\n- />\n-\n- <permission\n- id="plone.app.controlpanel.TinyMCE"\n- title="Plone Site Setup: TinyMCE"\n- >\n- <role name="Manager" />\n- </permission>\n-\n <!-- Control Panel Main Template -->\n <browser:page\n name="prefs_main_template"\n@@ -325,16 +313,6 @@\n permission="cmf.ManagePortal"\n />\n \n- <permission\n- id="Products.CMFPlone.ManagePortalAliases"\n- title="Manage Portal Aliases"\n- />\n-\n- <permission\n- id="Products.CMFPlone.ManageContextAliases"\n- title="Manage Context Aliases"\n- />\n-\n <browser:page\n name="redirection-controlpanel"\n for="plone.base.interfaces.IPloneSiteRoot"\ndiff --git a/Products/CMFPlone/controlpanel/permissions.zcml b/Products/CMFPlone/controlpanel/permissions.zcml\nindex be7eda7479..a701cf634b 100644\n--- a/Products/CMFPlone/controlpanel/permissions.zcml\n+++ b/Products/CMFPlone/controlpanel/permissions.zcml\n@@ -67,4 +67,26 @@\n <role name="Manager" />\n </permission>\n \n+ <permission\n+ id="plone.app.controlpanel.Imaging"\n+ title="Plone Site Setup: Imaging"\n+ />\n+\n+ <permission\n+ id="plone.app.controlpanel.TinyMCE"\n+ title="Plone Site Setup: TinyMCE"\n+ >\n+ <role name="Manager" />\n+ </permission>\n+\n+ <permission\n+ id="Products.CMFPlone.ManagePortalAliases"\n+ title="Manage Portal Aliases"\n+ />\n+\n+ <permission\n+ id="Products.CMFPlone.ManageContextAliases"\n+ title="Manage Context Aliases"\n+ />\n+\n </configure>\ndiff --git a/news/4028.bugfix b/news/4028.bugfix\nnew file mode 100644\nindex 0000000000..d0916ccdf0\n--- /dev/null\n+++ b/news/4028.bugfix\n@@ -0,0 +1,2 @@\n+move all permission definitions for controlpanels to unifed file from controlpanel directory\n+[jackahl]\n' | ||
b'diff --git a/Products/CMFPlone/Portal.py b/Products/CMFPlone/Portal.py\nindex cbf4c91149..878872e666 100644\n--- a/Products/CMFPlone/Portal.py\n+++ b/Products/CMFPlone/Portal.py\n@@ -61,7 +61,7 @@ def __getattr__(self, name):\n \n def __setattr__(self, name, obj):\n # handle re setting an item as an attribute\n- if self._tree is not None and name in self:\n+ if not name.startswith("_") and self._tree is not None and name in self:\n del self[name]\n self[name] = obj\n else:\ndiff --git a/news/4026.bugfix b/news/4026.bugfix\nnew file mode 100644\nindex 0000000000..a51ab29b2e\n--- /dev/null\n+++ b/news/4026.bugfix\n@@ -0,0 +1 @@\n+Avoid POSKeyError when commit occurs and we have savepoint that involves Plone Site. @wesleybl\n' | ||
|