Products.CMFPlone/issue-1376-controlpanel-permissions-master: Fixed accidentally removing permissions when saving portal_c

Maurits van Rees <jenkins-z4DKO/[email protected]> Wed, 02 Aug 2017 09:44:25 -0700 (PDT)
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: Products.CMFPlone
Branch: refs/heads/issue-1376-controlpanel-permissions-master
Date: 2017-08-02T18:43:21+02:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/69f7a2bbd1724b1d1fb3219dfb17d19984f3477f

Fixed accidentally removing permissions when saving portal_controlpanel in ZMI.

Fixes https://github.com/plone/Products.CMFPlone/issues/1376.

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

diff --git a/CHANGES.rst b/CHANGES.rst
index d4cc19604..bbbf583dc 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -29,6 +29,9 @@ New features:
 
 Bug fixes:
 
+- 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]
 
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
 
-        if not isinstance(permissions, basestring):
+        if isinstance(permissions, basestring):
             permissions = (permissions, )
 
         return PloneConfiglet(id=id,



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot