Commit fb34ee81 authored by Chris McDonough's avatar Chris McDonough

Added browser_id_manager, session_data_manager, and temp_folder to list of...

Added browser_id_manager, session_data_manager, and temp_folder to list of application object's reserved names (making them undeletable).

Added session_data to list of temp_folder's reserved names.
parent 831e183f
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__='''Application support __doc__='''Application support
$Id: Application.py,v 1.167 2001/11/20 20:38:55 chrism Exp $''' $Id: Application.py,v 1.168 2001/11/20 21:58:07 chrism Exp $'''
__version__='$Revision: 1.167 $'[11:-2] __version__='$Revision: 1.168 $'[11:-2]
import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_ import Globals,Folder,os,sys,App.Product, App.ProductRegistry, misc_
import time, traceback, os, string, Products import time, traceback, os, string, Products
...@@ -174,7 +174,10 @@ class Application(Globals.ApplicationDefaultPermissions, ...@@ -174,7 +174,10 @@ class Application(Globals.ApplicationDefaultPermissions,
_reserved_names=('standard_html_header', _reserved_names=('standard_html_header',
'standard_html_footer', 'standard_html_footer',
'standard_error_message', 'standard_error_message',
'Control_Panel') 'Control_Panel',
'browser_id_manager',
'session_data_manager',
'temp_folder')
# This class-default __allow_groups__ ensures that the # This class-default __allow_groups__ ensures that the
# emergency user can still access the system if the top-level # emergency user can still access the system if the top-level
...@@ -421,7 +424,8 @@ def initialize(app): ...@@ -421,7 +424,8 @@ def initialize(app):
# b/c: Ensure that a temp folder exists # b/c: Ensure that a temp folder exists
if not hasattr(app, 'temp_folder'): if not hasattr(app, 'temp_folder'):
from Products.TemporaryFolder.TemporaryFolder import MountedTemporaryFolder from Products.TemporaryFolder.TemporaryFolder import \
MountedTemporaryFolder
tf = MountedTemporaryFolder('temp_folder','Temporary Folder') tf = MountedTemporaryFolder('temp_folder','Temporary Folder')
app._setObject('temp_folder', tf) app._setObject('temp_folder', tf)
get_transaction().note('Added temp_folder') get_transaction().note('Added temp_folder')
...@@ -471,6 +475,9 @@ def initialize(app): ...@@ -471,6 +475,9 @@ def initialize(app):
'Session Data Container', timeout_mins = timeout_spec, 'Session Data Container', timeout_mins = timeout_spec,
addNotification=addnotify, delNotification = delnotify) addNotification=addnotify, delNotification = delnotify)
tf._setObject('session_data', toc) tf._setObject('session_data', toc)
tf_reserved = getattr(tf, '_reserved_names', ())
if 'session_data' not in tf_reserved:
tf._reserved_names = tf_reserved + ('session_data',)
get_transaction().note('Added session_data to temp_folder') get_transaction().note('Added session_data to temp_folder')
get_transaction().commit() get_transaction().commit()
del toc del toc
......
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