Commit da54e7b4 authored by Vincent Pelletier's avatar Vincent Pelletier

Products.ERP5.ERP5Site: Add a method to disable AuthorisationExtractor

parent 50ae2d8e
...@@ -619,6 +619,16 @@ class ERP5Site(ResponseHeaderGenerator, FolderMixIn, PortalObjectBase, CacheCook ...@@ -619,6 +619,16 @@ class ERP5Site(ResponseHeaderGenerator, FolderMixIn, PortalObjectBase, CacheCook
AutorisationExtractorBeforeTraverseHook.handle, AutorisationExtractorBeforeTraverseHook.handle,
) )
security.declareProtected(Permissions.ManagePortal, 'disableAuthorisationExtractor')
def disableAuthorisationExtractor(self):
"""
Disable AutorisationExtractorBeforeTraverseHook.
"""
BeforeTraverse.unregisterBeforeTraverse(
self,
AutorisationExtractorBeforeTraverseHook.handle,
)
security.declareProtected(Permissions.ManagePortal, 'isAuthorisationExtractorEnabled') security.declareProtected(Permissions.ManagePortal, 'isAuthorisationExtractorEnabled')
def isAuthorisationExtractorEnabled(self): def isAuthorisationExtractorEnabled(self):
""" """
......
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