Add UI for changing the bot owners.

Add neccesary UI in #administration and #settings for
changing the bot owner. The bot owner select control
is rendered dynamically in order to avoid performance
issues in case of large number of users.

Fixes: #2719.
This commit is contained in:
Harshit Bansal
2017-02-25 13:19:12 +05:30
committed by Tim Abbott
parent 8b11deedb3
commit 1948cb6a89
10 changed files with 88 additions and 23 deletions

View File

@@ -96,8 +96,11 @@ function dispatch_normal_event(event) {
} else if (event.op === 'remove') {
bot_data.remove(event.bot.email);
} else if (event.op === 'update') {
if (_.has(event.bot, 'owner_id')) {
event.bot.owner = people.get_person_from_user_id(event.bot.owner_id).email;
}
bot_data.update(event.bot.email, event.bot);
admin.update_user_full_name(event.bot.user_id, event.bot.full_name);
admin.update_user_data(event.bot.user_id, event.bot);
}
break;