Products.CMFPlone/plip-1486-redirection: Use ManagePortal permission temporary

Stephan Klinger <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: Products.CMFPlone
Branch: refs/heads/plip-1486-redirection
Date: 2017-07-10T09:31:40+03:00
Author: Stephan Klinger (staeff) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/eeff8e029ff6382e1c533a82aa7ac3c465e2b6d1

Use ManagePortal permission temporary

Files changed:
M Products/CMFPlone/controlpanel/browser/redirects.py

diff --git a/Products/CMFPlone/controlpanel/browser/redirects.py b/Products/CMFPlone/controlpanel/browser/redirects.py
index d61d47294..2f3c3a841 100644
--- a/Products/CMFPlone/controlpanel/browser/redirects.py
+++ b/Products/CMFPlone/controlpanel/browser/redirects.py
@@ -9,6 +9,7 @@
 
 from AccessControl import getSecurityManager
 #from Products.RedirectionTool.permissions import ModifyAliases
+from Products.CMFCore.permissions import ManagePortal
 
 from Products.Five.browser import BrowserView
 from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
@@ -31,7 +32,7 @@
 def absolutize_path(path, context=None, is_alias=True):
     """Check whether `path` is a well-formed path from the portal root, and
        make it Zope-root-relative. If `is_alias` (as opposed to "is_target"),
-       also make sure the user has the requisite ModifyAliases permissions to
+       also make sure the user has the requiered ModifyAliases permissions to
        make an alias from that path. Return a 2-tuple: (absolute redirection path,
        an error message iff something goes wrong and otherwise '').
 
@@ -65,7 +66,8 @@ def absolutize_path(path, context=None, is_alias=True):
                 if obj is None:
                     source = source[:-1]
                 else:
-                    if not getSecurityManager().checkPermission(ModifyAliases, obj):
+                    # if not getSecurityManager().checkPermission(ModifyAliases, obj):
+                    if not getSecurityManager().checkPermission(ManagePortal, obj):
                         obj = None
                     break
             if obj is None:



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.