Commit 33e1297b authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

ERP5Site: make Unauthorized redirection work with CMF 2.3

Products.CMFCore.CookieCrumbler's redirect support was moved to
Products.CMFDefault in CMF 2.3, cf:
- CMFCore: 387bd379fd9655aa1462715a04b4664f5c54974a
- CMFDefault: d319a68e8299e42a76f605ad79383bb78db14031

Registering portal_actions allows CMFDefault to redirect correctly,
cf UnauthorizedView.__call__
parent e7e94d27
...@@ -338,7 +338,11 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin): ...@@ -338,7 +338,11 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
def _registerMissingTools(self): def _registerMissingTools(self):
from Products.CMFCore import interfaces, utils from Products.CMFCore import interfaces, utils
tool_id_list = ("portal_skins", "portal_types", "portal_membership", tool_id_list = ("portal_skins", "portal_types", "portal_membership",
"portal_url", "portal_workflow") "portal_url", "portal_workflow",
# Registering portal_actions allows CMFDefault 2.3 to
# redirect correctly, cf UnauthorizedView.__call__
# BBB: no longer required after we drop Products.CMFDefault
"portal_actions")
if None in map(self.get, tool_id_list): if None in map(self.get, tool_id_list):
return False return False
sm = self._components sm = self._components
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment