Changeset 10055 for main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
- Timestamp:
- 4 Apr 2013, 15:12:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r9816 r10055 446 446 required = False,) 447 447 448 class IFailedLoginInfo(IKofaObject): 449 """Info about failed logins. 450 451 Timestamps are supposed to be stored as floats using time.time() 452 or similar. 453 """ 454 num = schema.Int( 455 title = _(u'Number of failed logins'), 456 description = _(u'Number of failed logins'), 457 required = True, 458 default = 0, 459 ) 460 461 last = schema.Float( 462 title = _(u'Timestamp'), 463 description = _(u'Timestamp of last failed login or `None`'), 464 required = False, 465 default = None, 466 ) 467 468 def as_tuple(): 469 """Get login info as tuple ``<NUM>, <TIMESTAMP>``. 470 """ 471 472 def set_values(num=0, last=None): 473 """Set number of failed logins and timestamp of last one. 474 """ 475 476 def increase(): 477 """Increase the current number of failed logins and set timestamp. 478 """ 479 480 def reset(): 481 """Set failed login counters back to zero. 482 """ 483 484 448 485 class IUserAccount(IKofaObject): 449 486 """A user account. 450 487 """ 488 489 failed_logins = Attribute("""FailedLoginInfo for this account""") 490 451 491 name = schema.TextLine( 452 492 title = _(u'User Id'), … … 486 526 required = False, 487 527 ) 528 529 488 530 489 531 class IPasswordValidator(Interface):
Note: See TracChangeset for help on using the changeset viewer.