mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 09:27:43 +00:00
Don't set an unusable password during deactivation.
This would have made reactivations hard, and doesn't really buy us much additional security. During deactivation, all a user's current sessions are deactivated and they are marked as not active. This prevents them from logging in via the web UI, and makes their API key unusable. Randomizing their password is probably gratuitious, especially as we start to allow authorized end-users to deactivate others. (imported from commit c63d23816da0452a1df821f2fa6c1db2761733da)
This commit is contained in:
@@ -118,8 +118,7 @@ def delete_all_user_sessions():
|
||||
|
||||
def do_deactivate(user_profile, log=True):
|
||||
user_profile.is_active = False;
|
||||
user_profile.set_unusable_password()
|
||||
user_profile.save(update_fields=["is_active", "password"])
|
||||
user_profile.save(update_fields=["is_active"])
|
||||
|
||||
delete_user_sessions(user_profile)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user