Changeset 8740


Ignore:
Timestamp:
25/03/13 12:45:03 (6 years ago)
Author:
mnagni
Message:

Incomplete - # 22698: [CEDA Site Python Port] MyCEDA Login needs to be more user-friendly
 http://team.ceda.ac.uk/trac/ceda/ticket/22698

Location:
mauRepo/dj_security/trunk/dj_security
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/dj_security/trunk/dj_security/middleware.py

    r8739 r8740  
    8989        if request.GET.get('r') and getattr(request, 'session', None): 
    9090            request.session['r'] = request.GET.get('r') 
    91         else: 
    92             request.session['r'] =  _get_path_to_host(request, force_path='local_logged_in') 
    93  
     91         
    9492        if request.path.endswith('account/register/') or request.path.endswith('accounts/profile/'): 
    9593            return _encode_authenticated_response(request, response) 
  • mauRepo/dj_security/trunk/dj_security/views/dj_security_login.py

    r8739 r8740  
    244244            # session if the existing session corresponds to a different 
    245245            # authenticated user. 
     246            r_copy = None 
     247            if request.session.has_key('r'): 
     248                r_copy = request.session['r'] 
    246249            request.session.flush() 
    247250            request.user = user 
     251            request.session['r'] = r_copy 
    248252    else: 
    249253        request.session.cycle_key() 
Note: See TracChangeset for help on using the changeset viewer.