mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
settings: Refactor callers of do_change_user_setting to pass acting_user.
This commit is contained in:
@@ -420,7 +420,7 @@ def accounts_register(
|
||||
do_activate_mirror_dummy_user(user_profile, acting_user=user_profile)
|
||||
do_change_password(user_profile, password)
|
||||
do_change_full_name(user_profile, full_name, user_profile)
|
||||
do_change_user_setting(user_profile, "timezone", timezone)
|
||||
do_change_user_setting(user_profile, "timezone", timezone, acting_user=user_profile)
|
||||
# TODO: When we clean up the `do_activate_mirror_dummy_user` code path,
|
||||
# make it respect invited_as_admin / is_realm_admin.
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ def json_change_settings(
|
||||
}
|
||||
for k, v in list(request_settings.items()):
|
||||
if v is not None and getattr(user_profile, k) != v:
|
||||
do_change_user_setting(user_profile, k, v)
|
||||
do_change_user_setting(user_profile, k, v, acting_user=user_profile)
|
||||
|
||||
req_vars = {
|
||||
k: v for k, v in list(locals().items()) if k in user_profile.notification_setting_types
|
||||
@@ -277,7 +277,7 @@ def json_change_settings(
|
||||
do_change_notification_settings(user_profile, k, v, acting_user=user_profile)
|
||||
|
||||
if timezone is not None and user_profile.timezone != timezone:
|
||||
do_change_user_setting(user_profile, "timezone", timezone)
|
||||
do_change_user_setting(user_profile, "timezone", timezone, acting_user=user_profile)
|
||||
|
||||
# TODO: Do this more generally.
|
||||
from zerver.lib.request import RequestNotes
|
||||
|
||||
Reference in New Issue
Block a user