diff --git a/product/ERP5/ERP5Site.py b/product/ERP5/ERP5Site.py index 518ee88d925aa684f267a3f49253339a7bcd678b..daef24f8005b039776431434bc5040e59f8f35d0 100644 --- a/product/ERP5/ERP5Site.py +++ b/product/ERP5/ERP5Site.py @@ -619,6 +619,16 @@ class ERP5Site(ResponseHeaderGenerator, FolderMixIn, PortalObjectBase, CacheCook AutorisationExtractorBeforeTraverseHook.handle, ) + security.declareProtected(Permissions.ManagePortal, 'disableAuthorisationExtractor') + def disableAuthorisationExtractor(self): + """ + Disable AutorisationExtractorBeforeTraverseHook. + """ + BeforeTraverse.unregisterBeforeTraverse( + self, + AutorisationExtractorBeforeTraverseHook.handle, + ) + security.declareProtected(Permissions.ManagePortal, 'isAuthorisationExtractorEnabled') def isAuthorisationExtractorEnabled(self): """