user_profile: Show subscribe widget for others to non-admins.

We now show subscribe widget in user profile modal for others
to non-admins if user is allowed to subscribe others to streams.
This commit is contained in:
Sahil Batra 2023-10-18 16:23:23 +05:30 committed by Tim Abbott
parent 180ed2e50f
commit 08e5e29054
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ export function show_user_profile(user, default_tab_key = "profile-tab") {
// want to show the subscribe widget for generic bots since they are system bots and for deactivated users.
// Therefore, we also check for that condition.
const show_user_subscribe_widget =
(people.can_admin_user(user) || page_params.is_admin) &&
(people.can_admin_user(user) || settings_data.user_can_subscribe_other_users()) &&
!user.is_system_bot &&
people.is_person_active(user.user_id);
const groups_of_user = user_groups.get_user_groups_of_user(user.user_id);