Commit 4206b850 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Merge branch 'master' of

parents c46ebf2d b15b7a54
......@@ -83,7 +83,7 @@ def user_for_token(token, authentication_url, override_users):
return None
def get_user(request, authentication_url='', override_users={}):
def get_user(request, authentication_url='', override_users={}, fallback_token=None):
request.user = None
request.user_uniq = None
......@@ -91,6 +91,8 @@ def get_user(request, authentication_url=''
user = user_for_token(request.GET.get('X-Auth-Token'), authentication_url, override_users)
if not user:
user = user_for_token(request.META.get('HTTP_X_AUTH_TOKEN'), authentication_url, override_users)
if not user:
user = user_for_token(fallback_token, authentication_url, override_users)
if not user:
......@@ -50,7 +50,7 @@ from optparse import OptionParser
from os.path import basename
from synnefo.db import models
from synnefo.logic import backend, users
from synnefo.logic import backend
from synnefo.plankton.backend import ImageBackend
from synnefo.util.dictconfig import dictConfig
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment