-
-
Notifications
You must be signed in to change notification settings - Fork 75
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-09-04T18:13:09+02:00 Author: Johannes Raggam (thet) <[email protected]> Commit: plone/plone.app.theming@61ef90d Minor optimization to disable Diazo theming via "X-Theme-Disabled" a tick earlier. Files changed: A news/244.internal M src/plone/app/theming/policy.py Repository: plone.app.theming Branch: refs/heads/master Date: 2024-09-04T21:31:06+02:00 Author: Peter Mathis (petschki) <[email protected]> Commit: plone/plone.app.theming@0f5a53f Merge pull request #244 from plone/thet-minor-opt Files changed: A news/244.internal M src/plone/app/theming/policy.py
- Loading branch information
Showing
1 changed file
with
24 additions
and
15 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 |
---|---|---|
@@ -1,23 +1,32 @@ | ||
Repository: plone.restapi | ||
Repository: plone.app.theming | ||
|
||
|
||
Branch: refs/heads/main | ||
Date: 2024-09-03T19:18:12-07:00 | ||
Author: Alessandro Ceglie (sauzher) <sauzher@gmail.com> | ||
Commit: https://github.com/plone/plone.restapi/commit/aec08ce8f9d787694142a76b16f3147fef5d628c | ||
Branch: refs/heads/master | ||
Date: 2024-09-04T18:13:09+02:00 | ||
Author: Johannes Raggam (thet) <thetetet@gmail.com> | ||
Commit: https://github.com/plone/plone.app.theming/commit/61ef90d91ec1e9c2f7a3e806d006102784ba1aab | ||
|
||
fix #1802 and #1803 (#1804) | ||
Minor optimization to disable Diazo theming via "X-Theme-Disabled" a tick earlier. | ||
|
||
* fix #1802 and #1803 | ||
|
||
* changelog | ||
|
||
* accepted stevepiercy suggestion on changelog | ||
Files changed: | ||
A news/244.internal | ||
M src/plone/app/theming/policy.py | ||
|
||
b'diff --git a/news/244.internal b/news/244.internal\nnew file mode 100644\nindex 00000000..4fea9be5\n--- /dev/null\n+++ b/news/244.internal\n@@ -0,0 +1,2 @@\n+Minor optimization to disable Diazo theming via `X-Theme-Disabled` a tick earlier.\n+[thet]\ndiff --git a/src/plone/app/theming/policy.py b/src/plone/app/theming/policy.py\nindex d837ff22..227b7b4d 100644\n--- a/src/plone/app/theming/policy.py\n+++ b/src/plone/app/theming/policy.py\n@@ -67,14 +67,14 @@ def getCurrentTheme(self):\n def isThemeEnabled(self, settings=None):\n """Whether theming is enabled."""\n \n- # Resolve debug_mode late (i.e. not on import time) since it may\n- # be set during import or test setup time\n- debug_mode = getConfiguration().debug_mode\n-\n # Disable theming if the response sets a header\n if self.request.response.getHeader("X-Theme-Disabled"):\n return False\n \n+ # Resolve debug_mode late (i.e. not on import time) since it may\n+ # be set during import or test setup time\n+ debug_mode = getConfiguration().debug_mode\n+\n # Check for diazo.off request parameter\n true_vals = ("1", "y", "yes", "t", "true")\n if debug_mode and self.request.get("diazo.off", "").lower() in true_vals:\n' | ||
|
||
Repository: plone.app.theming | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-09-04T21:31:06+02:00 | ||
Author: Peter Mathis (petschki) <[email protected]> | ||
Commit: https://github.com/plone/plone.app.theming/commit/0f5a53f81114d24299763b28580aa07114d43eca | ||
|
||
Merge pull request #244 from plone/thet-minor-opt | ||
|
||
Files changed: | ||
A news/1802.bugfix | ||
M src/plone/restapi/pas/add_plugin.zpt | ||
M src/plone/restapi/pas/config.zpt | ||
A news/244.internal | ||
M src/plone/app/theming/policy.py | ||
|
||
b'diff --git a/news/1802.bugfix b/news/1802.bugfix\nnew file mode 100644\nindex 000000000..347ab28a2\n--- /dev/null\n+++ b/news/1802.bugfix\n@@ -0,0 +1 @@\n+Fixed implementation of the `jwt_auth` plugin. It now can be added, and its properties, `use_keyring` and `store_tokens`, can be updated. @sauzher\ndiff --git a/src/plone/restapi/pas/add_plugin.zpt b/src/plone/restapi/pas/add_plugin.zpt\nindex b7e8c3636..74ef44710 100644\n--- a/src/plone/restapi/pas/add_plugin.zpt\n+++ b/src/plone/restapi/pas/add_plugin.zpt\n@@ -14,7 +14,7 @@\n <div class="form-group row">\n <label for="id_" class="form-label col-sm-3 col-md-2">Id</label>\n <div class="col-sm-9 col-md-10">\n- <input id="id_" name="id" class="form-control" type="text" tal:attributes="value request/id|string:jwt_auth" />\n+ <input id="id_" name="id_" class="form-control" type="text" tal:attributes="value request/id_|string:jwt_auth" />\n </div>\n </div>\n \ndiff --git a/src/plone/restapi/pas/config.zpt b/src/plone/restapi/pas/config.zpt\nindex bfe372989..ecb3859a8 100644\n--- a/src/plone/restapi/pas/config.zpt\n+++ b/src/plone/restapi/pas/config.zpt\n@@ -10,19 +10,19 @@\n <form action="manage_updateConfig" method="post">\n <div class="form-group">\n <label class="form-label" for="token_timeout">Token Validity Timeout (in seconds)</label>\n- <input type="text" \n+ <input type="text"\n name="token_timeout"\n class="form-control"\n tal:attributes="value context/token_timeout|nothing"/>\n <small class="form-text text-muted">After this, the token is invalid and the user must login again. Set to 0 for the token to remain valid indefinitely.</small>\n </div>\n- \n+\n <div class="form-group">\n <div class="form-check">\n- <input class="form-check-input" \n- type="checkbox" value="" \n- name="use_keyring" \n- id="use_keyring" \n+ <input class="form-check-input"\n+ type="checkbox" value="True"\n+ name="use_keyring"\n+ id="use_keyring"\n tal:attributes="checked python: context.use_keyring and \'checked\'">\n <label class="form-check-label" for="use_keyring">Use Keyring</label>\n <small class="form-text text-muted">If enabled, tokens are signed with a secret from Plone\'s keyring. If you want tokens that remain valid indefinitely you should disable this.</small>\n@@ -31,10 +31,10 @@\n \n <div class="form-group">\n <div class="form-check">\n- <input class="form-check-input" \n- type="checkbox" value="" \n- name="store_tokens" \n- id="store_tokens" \n+ <input class="form-check-input"\n+ type="checkbox" value="True"\n+ name="store_tokens"\n+ id="store_tokens"\n tal:attributes="checked python: context.store_tokens and \'checked\'">\n <label class="form-check-label" for="store_tokens">Store tokens</label>\n <small class="form-text text-muted">By default tokens are not stored on the server and thus can\'t be invalidated. If enabled, tokens that don\'t expire can be invalidated.</small>\n' | ||
b'diff --git a/news/244.internal b/news/244.internal\nnew file mode 100644\nindex 00000000..4fea9be5\n--- /dev/null\n+++ b/news/244.internal\n@@ -0,0 +1,2 @@\n+Minor optimization to disable Diazo theming via `X-Theme-Disabled` a tick earlier.\n+[thet]\ndiff --git a/src/plone/app/theming/policy.py b/src/plone/app/theming/policy.py\nindex d837ff22..227b7b4d 100644\n--- a/src/plone/app/theming/policy.py\n+++ b/src/plone/app/theming/policy.py\n@@ -67,14 +67,14 @@ def getCurrentTheme(self):\n def isThemeEnabled(self, settings=None):\n """Whether theming is enabled."""\n \n- # Resolve debug_mode late (i.e. not on import time) since it may\n- # be set during import or test setup time\n- debug_mode = getConfiguration().debug_mode\n-\n # Disable theming if the response sets a header\n if self.request.response.getHeader("X-Theme-Disabled"):\n return False\n \n+ # Resolve debug_mode late (i.e. not on import time) since it may\n+ # be set during import or test setup time\n+ debug_mode = getConfiguration().debug_mode\n+\n # Check for diazo.off request parameter\n true_vals = ("1", "y", "yes", "t", "true")\n if debug_mode and self.request.get("diazo.off", "").lower() in true_vals:\n' | ||
|