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

Merge branch 'master' of https://code.grnet.gr/git/synnefo

parents c46ebf2d b15b7a54
......@@ -83,7 +83,7 @@ def user_for_token(token, authentication_url, override_users):
except:
return None
def get_user(request, authentication_url='http://127.0.0.1:8000/im/authenticate', override_users={}):
def get_user(request, authentication_url='http://127.0.0.1:8000/im/authenticate', override_users={}, fallback_token=None):
request.user = None
request.user_uniq = None
......@@ -91,6 +91,8 @@ def get_user(request, authentication_url='http://127.0.0.1:8000/im/authenticate'
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:
return
......
......@@ -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