Skip to content

Commit

Permalink
[fc] Repository: plone.protect
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2017-08-02T17:41:48-03:00
Author: hvelarde (hvelarde) <hector.velarde@gmail.com>
Commit: plone/plone.protect@2ceb09a

Catch AttributeError on transform

Files changed:
M CHANGES.rst
M plone/protect/auto.py
Repository: plone.protect

Branch: refs/heads/master
Date: 2017-08-03T10:08:12+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.protect@2af6ba8

Merge pull request #65 from plone/hvelarde-attributeerror

Catch AttributeError on transform

Files changed:
M CHANGES.rst
M plone/protect/auto.py
  • Loading branch information
mauritsvanrees committed Aug 3, 2017
1 parent 08a8fce commit 7fb1a4e
Showing 1 changed file with 52 additions and 54 deletions.
106 changes: 52 additions & 54 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,90 +1,88 @@
Repository: Products.CMFPlone
Repository: plone.protect


Branch: refs/heads/master
Date: 2017-08-02T18:43:21+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/69f7a2bbd1724b1d1fb3219dfb17d19984f3477f

Fixed accidentally removing permissions when saving portal_controlpanel in ZMI.
Date: 2017-08-02T17:41:48-03:00
Author: hvelarde (hvelarde) <hector.velarde@gmail.com>
Commit: https://github.com/plone/plone.protect/commit/2ceb09a7c66183499b9e63a12c90e983c3c50fe5

Fixes https://github.com/plone/Products.CMFPlone/issues/1376.
Catch AttributeError on transform

Files changed:
M CHANGES.rst
M Products/CMFPlone/PloneControlPanel.py
M plone/protect/auto.py

diff --git a/CHANGES.rst b/CHANGES.rst
index d4cc19604..bbbf583dc 100644
index d3f9518..f8cf653 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -29,6 +29,9 @@ New features:

Bug fixes:
@@ -10,7 +10,8 @@ Breaking changes:

+- Fixed accidentally removing permissions when saving the ``portal_controlpanel`` settings in the ZMI.
+ Fixes `issue 1376 <https://github.com/plone/Products.CMFPlone/issues/1376>`_. [maurits]
+
- Do not open links on a new tab as this is against basic usability guidelines.
[hvelarde]
New features:

diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py
index 9a29951e6..34556be2c 100644
--- a/Products/CMFPlone/PloneControlPanel.py
+++ b/Products/CMFPlone/PloneControlPanel.py
@@ -195,7 +195,7 @@ def _extractAction(self, properties, index):
except ValueError:
visible = 0
-- *add item here*
+- Catch ``AttributeError`` on transform.
+ [hvelarde]

- if not isinstance(permissions, basestring):
+ if isinstance(permissions, basestring):
permissions = (permissions, )
Bug fixes:

return PloneConfiglet(id=id,
diff --git a/plone/protect/auto.py b/plone/protect/auto.py
index 78e7f20..2a37578 100644
--- a/plone/protect/auto.py
+++ b/plone/protect/auto.py
@@ -114,7 +114,7 @@ def parseTree(self, result, encoding):
# output does odd character encodings
result.serializer = html.tostring
return result
- except (TypeError, etree.ParseError):
+ except (AttributeError, TypeError, etree.ParseError):
# XXX handle something special?
logger.warn('error parsing dom, failure to add csrf '
'token to response for url %s' % self.request.URL)


Repository: Products.CMFPlone
Repository: plone.protect


Branch: refs/heads/master
Date: 2017-08-02T21:32:00+02:00
Date: 2017-08-03T10:08:12+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/b2edbdff8f2fc5020afee194d43262e649585d8c
Commit: https://github.com/plone/plone.protect/commit/2af6ba8009c2ce7dc11c422af617698ec3521feb

Merge pull request #2114 from plone/issue-1376-controlpanel-permissions-master
Merge pull request #65 from plone/hvelarde-attributeerror

Fixed removing permissions when saving portal_controlpanel in ZMI. [master]
Catch AttributeError on transform

Files changed:
M CHANGES.rst
M Products/CMFPlone/PloneControlPanel.py
M plone/protect/auto.py

diff --git a/CHANGES.rst b/CHANGES.rst
index d4cc19604..bbbf583dc 100644
index d3f9518..f8cf653 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -29,6 +29,9 @@ New features:

Bug fixes:
@@ -10,7 +10,8 @@ Breaking changes:

+- Fixed accidentally removing permissions when saving the ``portal_controlpanel`` settings in the ZMI.
+ Fixes `issue 1376 <https://github.com/plone/Products.CMFPlone/issues/1376>`_. [maurits]
+
- Do not open links on a new tab as this is against basic usability guidelines.
[hvelarde]
New features:

diff --git a/Products/CMFPlone/PloneControlPanel.py b/Products/CMFPlone/PloneControlPanel.py
index 9a29951e6..34556be2c 100644
--- a/Products/CMFPlone/PloneControlPanel.py
+++ b/Products/CMFPlone/PloneControlPanel.py
@@ -195,7 +195,7 @@ def _extractAction(self, properties, index):
except ValueError:
visible = 0
-- *add item here*
+- Catch ``AttributeError`` on transform.
+ [hvelarde]

- if not isinstance(permissions, basestring):
+ if isinstance(permissions, basestring):
permissions = (permissions, )
Bug fixes:

return PloneConfiglet(id=id,
diff --git a/plone/protect/auto.py b/plone/protect/auto.py
index 78e7f20..2a37578 100644
--- a/plone/protect/auto.py
+++ b/plone/protect/auto.py
@@ -114,7 +114,7 @@ def parseTree(self, result, encoding):
# output does odd character encodings
result.serializer = html.tostring
return result
- except (TypeError, etree.ParseError):
+ except (AttributeError, TypeError, etree.ParseError):
# XXX handle something special?
logger.warn('error parsing dom, failure to add csrf '
'token to response for url %s' % self.request.URL)


0 comments on commit 7fb1a4e

Please sign in to comment.