Ejemplo n.º 1
0
 def logged_in(self):
     controller = UserController()
     if not c.user:
         # a number of failed login attempts greater than 10
         # indicates that the locked user is associated with the current request
         qgovUser = Session.query(QGOVUser).filter(QGOVUser.login_attempts > 10).first()
         if qgovUser:
             qgovUser.login_attempts = 10
             Session.commit()
             return controller.login("account-locked")
     return controller.logged_in()
Ejemplo n.º 2
0
 def logged_in(self):
     controller = UserController()
     if not c.user:
         # a number of failed login attempts greater than 10
         # indicates that the locked user is associated with the current request
         seedUser = Session.query(SEEDUser).filter(
             SEEDUser.login_attempts > 10).first()
         if seedUser:
             seedUser.login_attempts = 10
             Session.commit()
             return controller.login('account-locked')
     return controller.logged_in()
Ejemplo n.º 3
0
 def logged_in(self):
     #log.debug("insde-------------------")
     controller = UserController()
     if not c.user:
         # a number of failed login attempts greater than 10
         # indicates that the locked user is associated with the current request
         seedUser = Session.query(SEEDUser).filter(
             SEEDUser.login_attempts > 5).first()
         if seedUser:
             seedUser.login_attempts = 5
             Session.commit()
             return controller.login(
                 'Login Failed: Bad username or password')
     return controller.logged_in()