Changeset 8750 for mauRepo


Ignore:
Timestamp:
28/03/13 10:31:42 (7 years ago)
Author:
mnagni
Message:

Incomplete - # 22689: [CEDA Site Python Port] Logout link
 http://team.ceda.ac.uk/trac/ceda/ticket/22689

Location:
mauRepo/dj_security_middleware/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/dj_security_middleware/trunk

    • Property svn:ignore set to
      dist

      dj_security_middleware.egg-info
  • mauRepo/dj_security_middleware/trunk/dj_security_middleware/dj_security_middleware/middleware.py

    r8742 r8750  
    7575    """     
    7676    def process_request(self, request): 
     77        request.session['accountid'] = None 
    7778        url_fiters = getattr(settings, 'DJ_SECURITY_FILTER', None) 
    7879        if url_fiters \ 
     
    105106                                             'user_data': user_data} 
    106107            LOGGER.debug("stored in request - userid:%s, user_data:%s" % (userid, user_data)) 
    107             pass 
     108            request.session['accountid'] = userid 
    108109        except MissingCookieException as ex: 
    109110            LOGGER.info("Missing 'auth_tkt' cookie") 
    110111        except DJMiddlewareException as ex:         
    111112            LOGGER.info(ex) 
    112         url = '%s?%s' % (settings.DJ_SECURITY_LOGIN_SERVICE, _build_ret_url(request)) 
    113         LOGGER.info("error in authentication. Redirecting to %s" % (url)) 
    114         return HttpResponseRedirect(url)            
     113            url = '%s?%s' % (settings.DJ_SECURITY_LOGIN_SERVICE, _build_ret_url(request)) 
     114            LOGGER.info("error in authentication. Redirecting to %s" % (url)) 
     115            return HttpResponseRedirect(url)            
    115116             
    116117    def process_response(self, request, response): 
Note: See TracChangeset for help on using the changeset viewer.