server/repository.py
changeset 5556 9ab2b4c74baf
parent 5447 f29dafba250a
child 5557 1a534c596bff
equal deleted inserted replaced
5555:a64f48dd5fe4 5556:9ab2b4c74baf
   405                     continue
   405                     continue
   406         else:
   406         else:
   407             raise AuthenticationError('authentication failed with all sources')
   407             raise AuthenticationError('authentication failed with all sources')
   408         cwuser = self._build_user(session, eid)
   408         cwuser = self._build_user(session, eid)
   409         if self.config.consider_user_state and \
   409         if self.config.consider_user_state and \
   410                not cwuser.state in cwuser.AUTHENTICABLE_STATES:
   410                not cwuser.cw_adapt_to('IWorkflowable').state in cwuser.AUTHENTICABLE_STATES:
   411             raise AuthenticationError('user is not in authenticable state')
   411             raise AuthenticationError('user is not in authenticable state')
   412         return cwuser
   412         return cwuser
   413 
   413 
   414     def _build_user(self, session, eid):
   414     def _build_user(self, session, eid):
   415         """return a CWUser entity for user with the given eid"""
   415         """return a CWUser entity for user with the given eid"""