diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-09-29 00:20:39 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-09-29 00:20:39 +0200 |
commit | 7ecc4aed5425ebde0ac997e90249f4f937040771 (patch) | |
tree | 8558ae88bb034e79b77a70fff5b64d485eba6206 /module/web | |
parent | reworked authorization, now works on api level (diff) | |
download | pyload-7ecc4aed5425ebde0ac997e90249f4f937040771.tar.xz |
new plugin Base class providing useful methods
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/api_app.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/web/api_app.py b/module/web/api_app.py index 156922d6a..12fffe099 100644 --- a/module/web/api_app.py +++ b/module/web/api_app.py @@ -46,10 +46,10 @@ def call_api(func, args=""): s = s.get_by_id(request.POST['session']) if not s or not s.get("authenticated", False): - return HTTPError(401, json_dumps("Unauthorized")) + return HTTPError(403, json_dumps("Forbidden")) if not PYLOAD.isAuthorized(func, {"role": s["role"], "permission": s["perms"]}): - return HTTPError(403, json_dumps("Forbidden")) + return HTTPError(401, json_dumps("Unauthorized")) args = args.split("/")[1:] kwargs = {} |