mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
bug fix: Limit updating full names in admin screens.
If we get a realm_user update for a user that is **not** changing their full name, we no longer call admin.update_user_full_name(). This was probably a fairly minor bug.
This commit is contained in:
@@ -589,11 +589,8 @@ run(function (override, capture, args) {
|
||||
|
||||
event = event_fixtures.realm_user__update;
|
||||
override('people', 'update', capture(['person']));
|
||||
override('admin', 'update_user_full_name', capture(['email', 'name']));
|
||||
dispatch(event);
|
||||
assert_same(args.person, event.person);
|
||||
assert_same(args.email, event.person.email);
|
||||
assert_same(args.name, event.person.full_name);
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ set_global('activity', {
|
||||
redraw: function () {},
|
||||
});
|
||||
set_global('admin', {
|
||||
update_user_full_name: function () {},
|
||||
show_or_hide_menu_item: function () {},
|
||||
});
|
||||
|
||||
|
||||
@@ -318,6 +318,7 @@ exports.update = function update(person) {
|
||||
if (_.has(person, 'full_name')) {
|
||||
exports.set_full_name(person_obj, person.full_name);
|
||||
|
||||
admin.update_user_full_name(person.email, person.full_name);
|
||||
activity.redraw();
|
||||
// TODO: update sender names on messages
|
||||
|
||||
|
||||
@@ -128,7 +128,6 @@ function dispatch_normal_event(event) {
|
||||
people.deactivate(event.person);
|
||||
} else if (event.op === 'update') {
|
||||
people.update(event.person);
|
||||
admin.update_user_full_name(event.person.email, event.person.full_name);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user