diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 01:21:41 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 01:21:41 +0200 |
commit | 20226f8cc5889efbefa61209e1adf6184d42cd00 (patch) | |
tree | 8f01af2c23465432f83481b656ed8c2743cb872a /pyload/webui/app/utils.py | |
parent | Spare code cosmetics (2) (diff) | |
download | pyload-20226f8cc5889efbefa61209e1adf6184d42cd00.tar.xz |
Spare code cosmetics (3)
Diffstat (limited to 'pyload/webui/app/utils.py')
-rw-r--r-- | pyload/webui/app/utils.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pyload/webui/app/utils.py b/pyload/webui/app/utils.py index ac7fa84fb..f9931f531 100644 --- a/pyload/webui/app/utils.py +++ b/pyload/webui/app/utils.py @@ -18,8 +18,8 @@ def render_to_response(file, args={}, proc=[]): def parse_permissions(session): perms = dict((x, False) for x in dir(PERMS) if not x.startswith("_")) - perms["ADMIN"] = False - perms["is_admin"] = False + perms['ADMIN'] = False + perms['is_admin'] = False if not session.get("authenticated", False): return perms @@ -66,12 +66,12 @@ def set_permission(perms): def set_session(request, info): s = request.environ.get('beaker.session') - s["authenticated"] = True - s["user_id"] = info["id"] - s["name"] = info["name"] - s["role"] = info["role"] - s["perms"] = info["permission"] - s["template"] = info["template"] + s['authenticated'] = True + s['user_id'] = info['id'] + s['name'] = info['name'] + s['role'] = info['role'] + s['perms'] = info['permission'] + s['template'] = info['template'] s.save() return s |