Anders Kaseorg
e1ed44907b
ruff: Fix SIM118 Use `key in dict` instead of `key in dict.keys()`.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-04 16:25:07 -08:00
Zixuan James Li
f55717d34d
user_groups: Track acting_user for update_users_in_full_members_system_group.
...
This is a prep-commit for populating RealmAuditLogs for changes made to
UserGroup.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-12-13 14:58:58 -08:00
Mateusz Mandera
470c0458e6
do_deactivate_user: Use .on_commit around send_event calls.
...
The previous commit did this for revoking sessions. send_events should
be handled similarly too, to correctly handle calling do_deactivate_user
inside a transaction.
2022-10-11 10:49:07 -07:00
Mateusz Mandera
a94b2572be
do_deactivate_user: Revoke sessions in transaction.on_commit().
...
Fixes #21709 .
2022-10-11 10:49:07 -07:00
Anders Kaseorg
b945aa3443
python: Use a real parser for email addresses.
...
Now that we can assume Python 3.6+, we can use the
email.headerregistry module to replace hacky manual email address
parsing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-29 15:47:33 -07:00
Tim Abbott
f446560607
do_delete_user: Clean up acting_user logic.
...
This now uses our standard acting_user convention for functions called
only from management commands.
2022-04-15 15:55:21 -07:00
Anders Kaseorg
d7981dad62
actions: Split out zerver.actions.users.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-04-14 17:14:34 -07:00