summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-29 00:20:39 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-29 00:20:39 +0200
commit7ecc4aed5425ebde0ac997e90249f4f937040771 (patch)
tree8558ae88bb034e79b77a70fff5b64d485eba6206 /module/web
parentreworked authorization, now works on api level (diff)
downloadpyload-7ecc4aed5425ebde0ac997e90249f4f937040771.tar.xz
new plugin Base class providing useful methods
Diffstat (limited to 'module/web')
-rw-r--r--module/web/api_app.py4
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 = {}