From f7703ff992f1bac671814f922f63313d7ba7155a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Tue, 24 Jul 2012 23:43:32 +0000 Subject: [PATCH] Added DJango request to values dictionary, passed at authenticator initialization (we may need request object to, for example, generate uniques ids based on server address, and request object can provide this) --- server/src/uds/xmlrpc/auths/Authenticators.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/uds/xmlrpc/auths/Authenticators.py b/server/src/uds/xmlrpc/auths/Authenticators.py index a2f968cd5..ba48e1c28 100644 --- a/server/src/uds/xmlrpc/auths/Authenticators.py +++ b/server/src/uds/xmlrpc/auths/Authenticators.py @@ -148,6 +148,7 @@ def createAuthenticator(credentials, type, data): ''' dict_ = dictFromData(data) # First create data without serialization, then serialies data with correct environment + dict_['request'] = credentials.request auth = None try: auth = Authenticator.objects.create(name = dict_['name'], comments = dict_['comments'], data_type = type, priority=int(dict_['priority'])) @@ -178,6 +179,7 @@ def modifyAuthenticator(credentials, id, data): try: auth = Authenticator.objects.get(pk=id) dict_ = dictFromData(data) + dict_['request'] = credentials.request a = auth.getInstance(dict_) auth.data = a.serialize() auth.name = dict_['name']