web/views/authentication.py
changeset 9032 629a8d49d6f5
parent 8694 d901c36bcfce
child 9042 6cc13a0a9145
equal deleted inserted replaced
9031:6ff29f2879da 9032:629a8d49d6f5
    91         return req.get_authorization()[0]
    91         return req.get_authorization()[0]
    92 
    92 
    93 class RepositoryAuthenticationManager(AbstractAuthenticationManager):
    93 class RepositoryAuthenticationManager(AbstractAuthenticationManager):
    94     """authenticate user associated to a request and check session validity"""
    94     """authenticate user associated to a request and check session validity"""
    95 
    95 
    96     def __init__(self, vreg):
    96     def __init__(self, repo):
    97         super(RepositoryAuthenticationManager, self).__init__(vreg)
    97         super(RepositoryAuthenticationManager, self).__init__(repo)
    98         self.repo = vreg.config.repository(vreg)
    98         self.repo = repo
       
    99         vreg = repo.vreg
    99         self.log_queries = vreg.config['query-log-file']
   100         self.log_queries = vreg.config['query-log-file']
   100         self.authinforetrievers = sorted(vreg['webauth'].possible_objects(vreg),
   101         self.authinforetrievers = sorted(vreg['webauth'].possible_objects(vreg),
   101                                          key=lambda x: x.order)
   102                                          key=lambda x: x.order)
   102         # 2-uple login / password, login is None when no anonymous access
   103         # 2-uple login / password, login is None when no anonymous access
   103         # configured
   104         # configured