From 7ecc4aed5425ebde0ac997e90249f4f937040771 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 29 Sep 2011 00:20:39 +0200 Subject: new plugin Base class providing useful methods --- module/web/api_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/web') 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 = {} -- cgit v1.2.3