X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fmanifoldproxy.py;fp=manifold%2Fmanifoldproxy.py;h=fd4c5ad96fbfba96a95d65ab21473e29ff28f6e3;hb=f44c5a4320e96117a4f463114e8adb10372cfb9e;hp=99de7849f4113a8bd6fc5b8c74b6be54e1a666ea;hpb=02b4adc22f4be31f0f846aea95a7e7ac4a806ae8;p=myslice.git diff --git a/manifold/manifoldproxy.py b/manifold/manifoldproxy.py index 99de7849..fd4c5ad9 100644 --- a/manifold/manifoldproxy.py +++ b/manifold/manifoldproxy.py @@ -53,7 +53,14 @@ with the query passed using POST""" manifold_query.fill_from_POST(request.POST) offline_filename="offline-%s-%s.json"%(manifold_query.action,manifold_query.object) # retrieve session for request - manifold_api_session_auth = request.session['manifold']['auth'] + + # We allow some requests to use the ADMIN user account + if manifold_query.get_from() == 'local:user' and manifold_query.get_action() == 'create': + print "W: Used hardcoded demo account for admin queries" + manifold_api_session_auth = {'AuthMethod': 'password', 'Username': 'demo', 'AuthString': 'demo'} + else: + manifold_api_session_auth = request.session['manifold']['auth'] + if debug_empty and manifold_query.action.lower()=='get': json_answer=json.dumps({'code':0,'value':[]}) print "By-passing : debug_empty & 'get' request : returning a fake empty list"