POC Campus Condorcet : l'attribut host_type mis en session dans tous les cas
This commit is contained in:
parent
67ce681718
commit
dc46c9474c
|
@ -37,11 +37,12 @@ def user_in_ldap(function):
|
|||
appear in a `ou=people...` sub-entry in the Campus LDAP.
|
||||
"""
|
||||
def wrapped(request, *args, **kwargs):
|
||||
if not 'mellon_session' in request.session:
|
||||
if 'host_type' not in request.session:
|
||||
if request.GET.get('host_type') == 'member':
|
||||
request.session['host_type'] = 'member'
|
||||
else:
|
||||
request.session['host_type'] = 'affiliate'
|
||||
if not 'mellon_session' in request.session:
|
||||
return redirect(reverse('auth_login') + "?next="+request.path)
|
||||
user_data = saml_collect_data(request)
|
||||
if not ldap_contains_user(user_data):
|
||||
|
|
Reference in New Issue