Add whether the user has a password set in user APIs
https://redmine.teklia.com/issues/7318
To better handle the case where a user has registered without a password, we need a new has_usable_password
attribute on the UserSerializer
, which will add it to RetrieveUser
, PartialUpdateUser
and UpdateUser
. This maps directly to the Django User.has_usable_password
method, so this can be done directly with a BooleanField
in DRF.
Existing tests will likely only include "has_usable_password": True
. Please add a unit test to show that has_usable_password
can be False
as well.