merged with Mariano's branch (inlucdes better debug.py and ace editor
This commit is contained in:
@@ -9,8 +9,18 @@ WEB2PY_VERSION_URL = WEB2PY_URL+'/examples/default/version'
|
||||
# browser.
|
||||
|
||||
## Default editor
|
||||
TEXT_EDITOR = 'edit_area' or 'amy'
|
||||
|
||||
TEXT_EDITOR = 'ace' or 'edit_area' or 'amy'
|
||||
## Editor Color scheme (only for ace)
|
||||
TEXT_EDITOR_THEME = (
|
||||
"chrome", "clouds", "clouds_midnight", "cobalt", "crimson_editor", "dawn",
|
||||
"dreamweaver", "eclipse", "idle_fingers", "kr_theme", "merbivore",
|
||||
"merbivore_soft", "monokai", "mono_industrial", "pastel_on_dark",
|
||||
"solarized_dark", "solarized_light", "textmate", "tomorrow",
|
||||
"tomorrow_night", "tomorrow_night_blue", "tomorrow_night_bright",
|
||||
"tomorrow_night_eighties", "twilight", "vibrant_ink")[0]
|
||||
## Editor Keyboard bindings (only for ace)
|
||||
TEXT_EDITOR_KEYBINDING = '' #'emacs' or 'vi'
|
||||
|
||||
### edit_area
|
||||
# The default font size, measured in 'points'. The value must be an integer > 0
|
||||
FONT_SIZE = 10
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import os, time
|
||||
import base64, os, time
|
||||
from gluon import portalocker
|
||||
from gluon.admin import apath
|
||||
from gluon.fileutils import read_file
|
||||
@@ -125,7 +125,7 @@ if request.controller == "webservices":
|
||||
if not basic or not basic[:6].lower() == 'basic ':
|
||||
raise HTTP(401,"Wrong credentials")
|
||||
(username, password) = base64.b64decode(basic[6:]).split(':')
|
||||
if not verify_password(password) or not is_manager():
|
||||
if not verify_password(password) or MULTI_USER_MODE:
|
||||
time.sleep(10)
|
||||
raise HTTP(403,"Not authorized")
|
||||
elif not session.authorized and not \
|
||||
|
||||
Reference in New Issue
Block a user