+
+ # We allow some requests to use the ADMIN user account
+ if (manifold_query.get_from() == 'local:user' and manifold_query.get_action() == 'create') or (manifold_query.get_from() == 'local:platform' and manifold_query.get_action() == 'get'):
+ 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"
+ return HttpResponse (json_answer, mimetype="application/json")