+
+ # 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'):
+ admin_user, admin_password = ConfigEngine().manifold_admin_user_password()
+ manifold_api_session_auth = {'AuthMethod': 'password', 'Username': admin_user, 'AuthString': admin_password}
+ else:
+ print request.session['manifold']
+ 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")
+