app/soc/views/helper/access.py
changeset 1048 0fe0cb8f7253
parent 1043 5e15994b2033
child 1061 09c243461de8
equal deleted inserted replaced
1047:26fade94886b 1048:0fe0cb8f7253
   356       * if a User has this Gooogle Account in their formerAccounts list
   356       * if a User has this Gooogle Account in their formerAccounts list
   357     """
   357     """
   358 
   358 
   359     self.checkIsLoggedIn(django_args)
   359     self.checkIsLoggedIn(django_args)
   360 
   360 
   361     if self.user or user_logic.isFormerAccount(self.id):
   361     if not self.user and not user_logic.isFormerAccount(self.id):
   362       message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % {
   362       # this account has not been used yet
   363           'email' : self.id.email()}
   363       return
   364       raise out_of_band.LoginRequest(message_fmt=message_fmt)
   364 
   365 
   365     message_fmt = DEF_USER_ACCOUNT_INVALID_MSG_FMT % {
   366     return
   366         'email' : self.id.email()}
       
   367     raise out_of_band.LoginRequest(message_fmt=message_fmt)
       
   368 
   367 
   369 
   368   def checkHasUserEntity(self, django_args):
   370   def checkHasUserEntity(self, django_args):
   369     """Raises an alternate HTTP response if Google Account has no User entity.
   371     """Raises an alternate HTTP response if Google Account has no User entity.
   370 
   372 
   371     Args:
   373     Args: