OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
The registration system uses both the activated field in addition to the User.is_active fields. Setting User.is_active to false after activation lets us disable an account and prevent the user from reactivating it. Because of this we must also update the activated field.
Connects #3247
Notes
Before this fix, users who accepted invitations were unable to reset their passwords because of this code:
Coverage increased (+0.001%) to 83.868% when pulling ea2f9fe6b7545aac66d7a8ca5420d32b92f59e72 on jcw/fix-invitation-activation into 7ea8b1f55e4388b89c0bce8ae7289f0766f8c77e on develop.
Overview
The registration system uses both the
activated
field in addition to theUser.is_active
fields. SettingUser.is_active
to false after activation lets us disable an account and prevent the user from reactivating it. Because of this we must also update theactivated
field.Connects #3247
Notes
Before this fix, users who accepted invitations were unable to reset their passwords because of this code:
https://github.com/OpenTreeMap/otm-core/blob/2.21.0/opentreemap/registration_backend/views.py#L211-L212
Testing Instructions
./scripts/debugserver.sh
activation-test