From: Loic & Edelberto Date: Wed, 23 Apr 2014 13:33:48 +0000 (-0300) Subject: FIBRE portal end of March X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=5ffad1dedf2e0fd3be2006d72e7d06662ece2419;p=unfold.git FIBRE portal end of March --- diff --git a/auth/manifoldbackend.py b/auth/manifoldbackend.py index 4f44661e..69cbf21a 100644 --- a/auth/manifoldbackend.py +++ b/auth/manifoldbackend.py @@ -23,14 +23,21 @@ class ManifoldBackend: return None try: - #usernameldap is from LDAP user form. If it is filled - See portal/homeview.py too - usernameldap = token['usernameldap'] + print "ManifoldBackend authenticate()" + # Mandatory fields in token username = token['username'] - password = token['password'] request = token['request'] + # usernameldap is optional - from LDAP user form. + # If it is filled - See portal/homeview.py too + if 'usernameldap' in token: + usernameldap = token['usernameldap'] + else: + usernameldap = None + password = token['password'] # if data are not from LDAP form then normal (local) login if not usernameldap: + print "not userldap ManifoldBackend authenticate()" auth = {'AuthMethod': 'password', 'Username': username, 'AuthString': password} api = ManifoldAPI(auth) sessions_result = api.forward(Query.create('local:session').to_dict()) @@ -62,8 +69,9 @@ class ManifoldBackend: # Edelberto LDAP authentication # if data are from LDAP form, so else: + print "userldap ManifoldBackend authenticate()" # XXX UGLY - # Needing to create an specif entries at settings.py (or myslice.ini) for these vars + # Needing to create an specific entries at settings.py (or myslice.ini) for these vars ################################################## # Edelberto - UFF - esilva@ic.uff.br # v1 - ldap authentication module diff --git a/myslice/settings.py b/myslice/settings.py index 8fd5d9ab..cf9cbb6c 100644 --- a/myslice/settings.py +++ b/myslice/settings.py @@ -265,3 +265,6 @@ CSRF_FAILURE_VIEW = 'manifoldapi.manifoldproxy.csrf_failure' #IA_JS_FORMAT = " + {% endblock %} {% block content %} @@ -9,37 +13,57 @@
-