[gen] Added config param 'enableSessionTimeout' for enabling/disabling session timeout (disabled by default).

This commit is contained in:
Gaetan Delannay 2012-12-15 23:36:56 +01:00
parent 1e3a8ba351
commit 70b18f597f
4 changed files with 13 additions and 1 deletions

View file

@ -318,7 +318,11 @@ class ZopeInstaller:
# Register a function warning us when a session object is deleted. When
# launching Zope in test mode, the temp folder does not exist.
if not hasattr(self.app, 'temp_folder'): return
self.app.temp_folder.session_data.setDelNotificationTarget(onDelSession)
sessionData = self.app.temp_folder.session_data
if self.config.enableSessionTimeout:
sessionData.setDelNotificationTarget(onDelSession)
else:
sessionData.setDelNotificationTarget(None)
def enableUserTracking(self):
'''Enables the machinery allowing to know who is currently logged in.