diff --git a/web/src/invite.ts b/web/src/invite.ts index b08d185c1d..27db00f9a2 100644 --- a/web/src/invite.ts +++ b/web/src/invite.ts @@ -340,6 +340,7 @@ function open_invite_user_modal(e: JQuery.ClickEvent): void new_stream_announcements_stream: stream_data.get_new_stream_announcements_stream(), show_select_default_streams_option: stream_data.get_default_stream_ids().length !== 0, user_has_email_set: !settings_data.user_email_not_configured(), + can_subscribe_other_users: settings_data.user_can_subscribe_other_users(), }); function invite_user_modal_post_render(): void { diff --git a/web/styles/app_components.css b/web/styles/app_components.css index 62815a7f2c..8863e9253c 100644 --- a/web/styles/app_components.css +++ b/web/styles/app_components.css @@ -529,7 +529,8 @@ div.overlay { .upgrade-tip, .upgrade-or-sponsorship-tip, -.tip { +.tip, +.invite-stream-notice { position: relative; display: block; background-color: hsl(46deg 63% 95%); diff --git a/web/styles/dark_theme.css b/web/styles/dark_theme.css index 5f6a2daf0e..bcec696097 100644 --- a/web/styles/dark_theme.css +++ b/web/styles/dark_theme.css @@ -825,7 +825,8 @@ .upgrade-tip, .upgrade-or-sponsorship-tip, - .tip { + .tip, + .invite-stream-notice { color: inherit; background-color: hsl(46deg 28% 38% / 27%); border: 1px solid hsl(49deg 38% 46%); diff --git a/web/templates/invite_user_modal.hbs b/web/templates/invite_user_modal.hbs index e885e23b06..6acccf6f3f 100644 --- a/web/templates/invite_user_modal.hbs +++ b/web/templates/invite_user_modal.hbs @@ -3,14 +3,20 @@ {{#if development_environment}}
{{/if}} - {{#unless user_has_email_set }} + {{#if (not user_has_email_set) }}
{{#tr}} You must configure your email to access this feature. {{#*inline "z-link"}}{{> @partial-block }}{{/inline}} {{/tr}}
- {{/unless}} + {{else if (not can_subscribe_other_users)}} +
+ {{#tr}}The users you invite will be automatically added to default streams for this organization, as you do not have permission to configure which streams new users join. + {{#*inline "z-link"}}{{> @partial-block}}{{/inline}} + {{/tr}} +
+ {{/if}}
@@ -55,6 +61,7 @@ {{/if}}
+ {{#if can_subscribe_other_users}}
@@ -90,4 +97,5 @@
+ {{/if}}