diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-20 21:38:42 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-20 23:01:29 +0200 |
commit | 9327b55e147d95b5865f23788f980c7268ea03e3 (patch) | |
tree | 0260b6f90b9e6fab5548e29e44b6d66f3334c98e /pyload/webui | |
parent | PEP-8, Python Zen, refactor and reduce code (part 9 in master module/network) (diff) | |
download | pyload-9327b55e147d95b5865f23788f980c7268ea03e3.tar.xz |
Spare code cosmetics (7)
Diffstat (limited to 'pyload/webui')
-rw-r--r-- | pyload/webui/app/pyloadweb.py | 2 | ||||
-rw-r--r-- | pyload/webui/app/utils.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pyload/webui/app/pyloadweb.py b/pyload/webui/app/pyloadweb.py index 154409655..f4edb6bd4 100644 --- a/pyload/webui/app/pyloadweb.py +++ b/pyload/webui/app/pyloadweb.py @@ -486,7 +486,7 @@ def admin(): for data in user.itervalues(): data['perms'] = {} get_permission(data['perms'], data['permission']) - data['perms']['admin'] = True if data['role'] is 0 else False + data['perms']['admin'] = data['role'] is 0 s = request.environ.get('beaker.session') if request.environ.get('REQUEST_METHOD', "GET") == "POST": diff --git a/pyload/webui/app/utils.py b/pyload/webui/app/utils.py index 69067d8fe..8957f061e 100644 --- a/pyload/webui/app/utils.py +++ b/pyload/webui/app/utils.py @@ -80,8 +80,8 @@ def set_session(request, info): def parse_userdata(session): - return {"name": session.get("name", "Anonymous"), - "is_admin": True if session.get("role", 1) == 0 else False, + return {"name" : session.get("name", "Anonymous"), + "is_admin" : session.get("role", 1) == 0, "is_authenticated": session.get("authenticated", False)} |