Skip to content

Commit

Permalink
[fc] Repository: plone.app.content
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2024-06-06T23:32:52+02:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: plone/plone.app.content@87bd122

No longer check visible_ids on the 'select default page' form.

Usage of ``visible_ids`` was largely removed in Plone 5.0 already, and you cannot change the setting on the portal or the member.
This was using the deprecated ``portal_properties`` tool.
See also plone/plone.app.contenttypes#693

Files changed:
A news/125.bugfix
M plone/app/content/browser/templates/select_default_page.pt
Repository: plone.app.content

Branch: refs/heads/master
Date: 2024-06-07T05:47:09-04:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: plone/plone.app.content@a7a5cdd

Merge pull request #283 from plone/remove-portal-properties-tool

No longer check visible_ids on the 'select default page' form.

Files changed:
A news/125.bugfix
M plone/app/content/browser/templates/select_default_page.pt
  • Loading branch information
jensens committed Jun 7, 2024
1 parent 8299110 commit 0a2693c
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
Repository: Products.PlonePAS
Repository: plone.app.content


Branch: refs/heads/master
Date: 2024-06-07T00:07:41+02:00
Date: 2024-06-06T23:32:52+02:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: https://github.com/plone/Products.PlonePAS/commit/c03dccbea54be35c6410379db7f58ccf08ff282f
Commit: https://github.com/plone/plone.app.content/commit/87bd1226681f18faa2df28e6a897f64b4a53fda2

Do not test with visible_ids boolean property, as this may get removed.
No longer check visible_ids on the 'select default page' form.

See https://github.com/plone/plone.app.contenttypes/pull/693
Usage of ``visible_ids`` was largely removed in Plone 5.0 already, and you cannot change the setting on the portal or the member.
This was using the deprecated ``portal_properties`` tool.
See also https://github.com/plone/plone.app.contenttypes/pull/693

Files changed:
A news/125.tests
M src/Products/PlonePAS/tests/test_properties.py
A news/125.bugfix
M plone/app/content/browser/templates/select_default_page.pt

b'diff --git a/news/125.tests b/news/125.tests\nnew file mode 100644\nindex 00000000..3bd3285d\n--- /dev/null\n+++ b/news/125.tests\n@@ -0,0 +1,2 @@\n+Do not test with ``visible_ids`` boolean property, as this may get removed.\n+[maurits]\ndiff --git a/src/Products/PlonePAS/tests/test_properties.py b/src/Products/PlonePAS/tests/test_properties.py\nindex 37ee865c..e0e0afc0 100644\n--- a/src/Products/PlonePAS/tests/test_properties.py\n+++ b/src/Products/PlonePAS/tests/test_properties.py\n@@ -211,6 +211,10 @@ def setUp(self):\n self.md = getToolByName(self.portal, "portal_memberdata")\n self.gt = getToolByName(self.portal, "portal_groups")\n \n+ # All existing boolean properties might get removed at some point,\n+ # so add a new one for testing.\n+ self.md.manage_addProperty("fluffy", False, "boolean")\n+\n # Create a new Member\n self.mt.addMember(\n "member1",\n@@ -273,11 +277,11 @@ def testInexactStringSearch(self):\n self.assertEqual(results, [])\n \n def testBooleanSearch(self):\n- results = self.pas.searchUsers(visible_ids=True)\n+ results = self.pas.searchUsers(fluffy=True)\n results = [info["userid"] for info in results]\n self.assertEqual(results, [])\n \n- results = self.pas.searchUsers(visible_ids=False)\n+ results = self.pas.searchUsers(fluffy=False)\n results = [info["userid"] for info in results]\n self.assertEqual(results, ["member1", "member2"])\n \n'
b'diff --git a/news/125.bugfix b/news/125.bugfix\nnew file mode 100644\nindex 00000000..07313dda\n--- /dev/null\n+++ b/news/125.bugfix\n@@ -0,0 +1,4 @@\n+No longer check ``visible_ids`` on the \'select default page\' form.\n+Usage of ``visible_ids`` was largely removed in Plone 5.0 already, and you cannot change the setting on the portal or the member.\n+This was using the deprecated ``portal_properties`` tool.\n+[maurits]\ndiff --git a/plone/app/content/browser/templates/select_default_page.pt b/plone/app/content/browser/templates/select_default_page.pt\nindex 302fbd13..d7b33794 100644\n--- a/plone/app/content/browser/templates/select_default_page.pt\n+++ b/plone/app/content/browser/templates/select_default_page.pt\n@@ -46,9 +46,6 @@\n ">\n <tal:hasitems define="\n n_items python:len(items);\n- member portal_state/member;\n- portal_visible_ids context/portal_properties/site_properties/visible_ids|nothing;\n- member_visible_ids python:member.getProperty(\'visible_ids\', context.portal_memberdata.getProperty(\'visible_ids\'));\n "\n condition="items"\n >\n@@ -56,7 +53,6 @@\n <tal:item repeat="item items">\n <dt tal:define="\n normalized_type python:plone_view.normalizeString(item.portal_type);\n- item_id python:\'(%s)\' % item.getId if (portal_visible_ids and member_visible_ids) else \'\';\n ">\n <input name="objectId"\n type="radio"\n@@ -67,7 +63,7 @@\n checked python: (n_items==1 or item.getId==cur_page) and \'checked\' or None;\n "\n />\n- <label tal:content="string:${item/pretty_title_or_id} $item_id"\n+ <label tal:content="string:${item/pretty_title_or_id}"\n tal:attributes="\n for item/getId;\n class string:contenttype-${normalized_type};\n'

Repository: Products.PlonePAS
Repository: plone.app.content


Branch: refs/heads/master
Date: 2024-06-07T05:45:44-04:00
Date: 2024-06-07T05:47:09-04:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: https://github.com/plone/Products.PlonePAS/commit/f755f201651eb955865167c60f6d3d2d2d9f16af
Commit: https://github.com/plone/plone.app.content/commit/a7a5cdd8f6b053dadda1da0b23250785e5db3116

Merge pull request #88 from plone/remove-portal-properties-tool
Merge pull request #283 from plone/remove-portal-properties-tool

Do not test with visible_ids boolean property, as this may get removed.
No longer check visible_ids on the 'select default page' form.

Files changed:
A news/125.tests
M src/Products/PlonePAS/tests/test_properties.py
A news/125.bugfix
M plone/app/content/browser/templates/select_default_page.pt

b'diff --git a/news/125.tests b/news/125.tests\nnew file mode 100644\nindex 00000000..3bd3285d\n--- /dev/null\n+++ b/news/125.tests\n@@ -0,0 +1,2 @@\n+Do not test with ``visible_ids`` boolean property, as this may get removed.\n+[maurits]\ndiff --git a/src/Products/PlonePAS/tests/test_properties.py b/src/Products/PlonePAS/tests/test_properties.py\nindex 37ee865c..e0e0afc0 100644\n--- a/src/Products/PlonePAS/tests/test_properties.py\n+++ b/src/Products/PlonePAS/tests/test_properties.py\n@@ -211,6 +211,10 @@ def setUp(self):\n self.md = getToolByName(self.portal, "portal_memberdata")\n self.gt = getToolByName(self.portal, "portal_groups")\n \n+ # All existing boolean properties might get removed at some point,\n+ # so add a new one for testing.\n+ self.md.manage_addProperty("fluffy", False, "boolean")\n+\n # Create a new Member\n self.mt.addMember(\n "member1",\n@@ -273,11 +277,11 @@ def testInexactStringSearch(self):\n self.assertEqual(results, [])\n \n def testBooleanSearch(self):\n- results = self.pas.searchUsers(visible_ids=True)\n+ results = self.pas.searchUsers(fluffy=True)\n results = [info["userid"] for info in results]\n self.assertEqual(results, [])\n \n- results = self.pas.searchUsers(visible_ids=False)\n+ results = self.pas.searchUsers(fluffy=False)\n results = [info["userid"] for info in results]\n self.assertEqual(results, ["member1", "member2"])\n \n'
b'diff --git a/news/125.bugfix b/news/125.bugfix\nnew file mode 100644\nindex 00000000..07313dda\n--- /dev/null\n+++ b/news/125.bugfix\n@@ -0,0 +1,4 @@\n+No longer check ``visible_ids`` on the \'select default page\' form.\n+Usage of ``visible_ids`` was largely removed in Plone 5.0 already, and you cannot change the setting on the portal or the member.\n+This was using the deprecated ``portal_properties`` tool.\n+[maurits]\ndiff --git a/plone/app/content/browser/templates/select_default_page.pt b/plone/app/content/browser/templates/select_default_page.pt\nindex 302fbd13..d7b33794 100644\n--- a/plone/app/content/browser/templates/select_default_page.pt\n+++ b/plone/app/content/browser/templates/select_default_page.pt\n@@ -46,9 +46,6 @@\n ">\n <tal:hasitems define="\n n_items python:len(items);\n- member portal_state/member;\n- portal_visible_ids context/portal_properties/site_properties/visible_ids|nothing;\n- member_visible_ids python:member.getProperty(\'visible_ids\', context.portal_memberdata.getProperty(\'visible_ids\'));\n "\n condition="items"\n >\n@@ -56,7 +53,6 @@\n <tal:item repeat="item items">\n <dt tal:define="\n normalized_type python:plone_view.normalizeString(item.portal_type);\n- item_id python:\'(%s)\' % item.getId if (portal_visible_ids and member_visible_ids) else \'\';\n ">\n <input name="objectId"\n type="radio"\n@@ -67,7 +63,7 @@\n checked python: (n_items==1 or item.getId==cur_page) and \'checked\' or None;\n "\n />\n- <label tal:content="string:${item/pretty_title_or_id} $item_id"\n+ <label tal:content="string:${item/pretty_title_or_id}"\n tal:attributes="\n for item/getId;\n class string:contenttype-${normalized_type};\n'

0 comments on commit 0a2693c

Please sign in to comment.