equal
deleted
inserted
replaced
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""" |