Update whitelisting documentation.

This commit is contained in:
Aleksi Häkli 2019-12-29 16:53:41 +02:00 committed by GitHub
parent 071ebd88e4
commit dbc7f54ac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,11 @@ def is_user_attempt_whitelisted(request, credentials: dict = None) -> bool:
A whitelisted user has the magic ``nolockout`` property set.
If the property is unknown or False or the user can not be found,
this implementation fails gracefully and returns True.
this implementation fails gracefully and returns False.
This is a legacy method forom an older release
that should be converted to a configurable callable
for determining whitelisting criteria per developer specification.
"""
username_field = getattr(get_user_model(), "USERNAME_FIELD", "username")