Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ui_init: Initialize user_groups before people.
Sahil Batraae601560b3b4
diff --git a/web/src/ui_init.js b/web/src/ui_init.jsindex 6fa41ee6bb7..c083566fc34 100644--- a/web/src/ui_init.js+++ b/web/src/ui_init.js@@ -477,6 +477,16 @@ export async function initialize_everything(state_data) {compose_send_menu_popover.initialize();realm_user_settings_defaults.initialize(state_data.realm_settings_defaults);++ // The user_group must be initialized before right sidebar+ // module, so that we can tell whether user is member of+ // user_group whose members are allowed to create multiuse+ // invite. The user_group module must also be initialized+ // before people module, so that can_access_all_users_group+ // setting group can be used to check whether the user+ // has permission to access all other users.+ user_groups.initialize(state_data.user_groups);+await people.initialize(current_user.user_id, state_data.people, state_data.user_groups);starred_messages.initialize(state_data.starred_messages);@@ -487,11 +497,6 @@ export async function initialize_everything(state_data) {emoji_codes: generated_emoji_codes,});- // The user_group must be initialized before right sidebar- // module, so that we can tell whether user is member of- // user_group whose members are allowed to create multiuse invite.- user_groups.initialize(state_data.user_groups);-// Channel folders data must be initialized before left sidebar.channel_folders.initialize(state_data.channel_folders);