diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 12:22:20 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-12 12:22:20 +0200 |
commit | 906bb7c1ecc5c34aa93148894eef763f27eba98e (patch) | |
tree | 2f09a639cdd9e414e8f165a667c71a837288d4de /pyload/webui/app/utils.py | |
parent | Revert damaged logo.png (diff) | |
download | pyload-906bb7c1ecc5c34aa93148894eef763f27eba98e.tar.xz |
Other import fixes
Diffstat (limited to 'pyload/webui/app/utils.py')
-rw-r--r-- | pyload/webui/app/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pyload/webui/app/utils.py b/pyload/webui/app/utils.py index 695162f91..3526f2615 100644 --- a/pyload/webui/app/utils.py +++ b/pyload/webui/app/utils.py @@ -3,7 +3,7 @@ import os -from bottle import request, HTTPError, redirect, ServerAdapter +import bottle from pyload.Api import has_permission, PERMS, ROLE from pyload.webui import env, THEME @@ -97,16 +97,16 @@ def login_required(perm=None): perms = parse_permissions(s) if perm not in perms or not perms[perm]: if request.headers.get('X-Requested-With') == 'XMLHttpRequest': - return HTTPError(403, "Forbidden") + return bottle.HTTPError(403, "Forbidden") else: - return redirect("/nopermission") + return bottle.redirect("/nopermission") return func(*args, **kwargs) else: if request.headers.get('X-Requested-With') == 'XMLHttpRequest': - return HTTPError(403, "Forbidden") + return bottle.HTTPError(403, "Forbidden") else: - return redirect("/login") + return bottle.redirect("/login") return _view |