Add new option to prevent database listing

This commit is contained in:
Nicolas Évrard
2011-03-13 11:38:33 +01:00
parent 1766b36764
commit bc80334588
4 changed files with 7 additions and 0 deletions
+1
View File
@@ -1,3 +1,4 @@
* Add new configuration option to prevent database listing
* Add warning to wizards
* Add server-side icons
* Add support for file link to BinaryField
+3
View File
@@ -87,3 +87,6 @@
# Enable auto-reload of modules if changed
#auto_reload = True
# Prevent database listing
#prevent_dblist = False
+1
View File
@@ -49,6 +49,7 @@ class ConfigManager(object):
'session_timeout': 600,
'psyco': False,
'auto_reload': True,
'prevent_dblist': False,
'init': {},
'update': {},
}
+2
View File
@@ -69,6 +69,8 @@ def dispatch(host, port, protocol, database_name, user, session, object_type,
except Exception:
return False
elif method == 'list':
if CONFIG['prevent_dblist']:
raise Exception('AccessDenied')
database = Database().connect()
try:
cursor = database.cursor()