Changeset 1067 for ZMS/trunk/ZMSGlobals.py
- Timestamp:
- 25.06.2010 23:24:03 (2 years ago)
- File:
-
- 1 edited
-
ZMS/trunk/ZMSGlobals.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ZMS/trunk/ZMSGlobals.py
r1051 r1067 30 30 from cStringIO import StringIO 31 31 from types import StringTypes 32 from zExceptions import Unauthorized33 32 from binascii import b2a_base64, a2b_base64 34 33 import base64 … … 1357 1356 if _globals.debug( self): 1358 1357 _globals.writeLog( self, '[localfs_read]: filename=%s'%filename) 1358 1359 1359 # Check permissions. 1360 access = False 1361 for perm in self.getConfProperty('ZMS.localfs_read','').split(';')+[package_home(globals())]: 1362 access = access or ( len( perm) > 0 and filename.lower().startswith( perm.lower())) 1363 # Raise unauthorized error. 1364 if not access: 1365 raise Unauthorized 1360 if REQUEST is not None: 1361 authorized = False 1362 for perm in self.getConfProperty('ZMS.localfs_read','').split(';')+[package_home(globals())]: 1363 authorized = authorized or ( len( perm) > 0 and filename.lower().startswith( perm.lower())) 1364 if not authorized: 1365 RESPONSE = REQUEST.RESPONSE 1366 raise REPONSE.unauthorized() 1367 1366 1368 # Read file. 1367 1369 if type( mode) is dict:
Note: See TracChangeset
for help on using the changeset viewer.
