mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
settings: Hide upgrade links and storage stats for guests.
Avoids displaying the upgrade banner in upgrade_tip_widget.hbs and attachments stats banner in 'Uploaded files' UI when the user is logged in as a guest. This ensures that guest users do not see upgrade-related links that do not apply to them and cause 404 errors. Fixes #20630.
This commit is contained in:
committed by
Tim Abbott
parent
ee3660ae19
commit
e67786154a
@@ -13,7 +13,7 @@ import {$t, $t_html} from "./i18n.ts";
|
||||
import * as ListWidget from "./list_widget.ts";
|
||||
import * as loading from "./loading.ts";
|
||||
import * as scroll_util from "./scroll_util.ts";
|
||||
import {realm} from "./state_data.ts";
|
||||
import {current_user, realm} from "./state_data.ts";
|
||||
import * as timerender from "./timerender.ts";
|
||||
import * as ui_report from "./ui_report.ts";
|
||||
|
||||
@@ -68,6 +68,9 @@ function set_upload_space_stats(): void {
|
||||
if (realm.realm_upload_quota_mib === null) {
|
||||
return;
|
||||
}
|
||||
if (current_user.is_guest) {
|
||||
return;
|
||||
}
|
||||
const args = {
|
||||
show_upgrade_message: realm.realm_plan_type === 2,
|
||||
upload_quota_string: $t(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<div>
|
||||
{{#unless is_guest}}
|
||||
{{#unless zulip_plan_is_not_limited}}
|
||||
{{#if is_business_type_org}}
|
||||
<a href="/upgrade/" class="upgrade-tip" target="_blank" rel="noopener noreferrer">
|
||||
@@ -14,4 +15,5 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user