diff --git a/modules/caissedepargne/pages.py b/modules/caissedepargne/pages.py index 824d04e9922eead89084d5d79109c4c970fa40b4..18622a7086362cbe8378137c99f1992b41218507 100644 --- a/modules/caissedepargne/pages.py +++ b/modules/caissedepargne/pages.py @@ -119,6 +119,21 @@ def send_form(self): class AuthenticationMethodPage(JsonPage): + @property + def logged(self): + try: + context, = list(self.doc.get('context', {})) + except ValueError: + self.logger.warning("oops, we don't know if we're at login or during other authentication") + return False + + return ( + # can be VIR_SEPA_FR or VIR_SEPA + context.startswith('VIR_') + # adding a recipient + or context == 'AJOUT_CPT' + ) + def get_validation_id(self): return Dict('id')(self.doc)