From 73ede837c8b9a31a8bd0b380d2246fba67bddd89 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 20 Sep 2011 20:41:45 +0200 Subject: general JSON API, url parser --- module/web/pyload_app.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'module/web/pyload_app.py') diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 8d76d39ec..49568baad 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -32,7 +32,7 @@ from bottle import route, static_file, request, response, redirect, HTTPError, e from webinterface import PYLOAD, PYLOAD_DIR, PROJECT_DIR, SETUP from utils import render_to_response, parse_permissions, parse_userdata, \ - login_required, get_permission, set_permission, toDict + login_required, get_permission, set_permission, toDict, set_session from filters import relpath, unquotepath @@ -119,15 +119,7 @@ def login_post(): if not info: return render_to_response("login.html", {"errors": True}, [pre_processor]) - s = request.environ.get('beaker.session') - s["authenticated"] = True - s["id"] = info["id"] - s["name"] = info["name"] - s["role"] = info["role"] - s["perms"] = info["permission"] - s["template"] = info["template"] - s.save() - + set_session(request, info) return redirect("/") -- cgit v1.2.3