diff --git a/src/components/settings/StorageSettings.tsx b/src/components/settings/StorageSettings.tsx
index beaadb80..c3314043 100644
--- a/src/components/settings/StorageSettings.tsx
+++ b/src/components/settings/StorageSettings.tsx
@@ -10,6 +10,7 @@ import { spacing, radius, typography, type ThemePalette } from '../../theme/toke
import { useColors } from '../../theme/colors';
import { useSettingsStore } from '../../stores/settings-store';
import { useLocaleStore } from '../../stores/locale-store';
+import { usePolicyFeature } from '../../stores/policy-store';
import { useOfflineCacheStore } from '../../stores/offline-cache-store';
import { useOutboxStore } from '../../stores/outbox-store';
import { runOfflineSync, formatBytes } from '../../lib/offline-sync';
@@ -29,6 +30,9 @@ export function StorageSettings({ onOpenTroubleshooting }: StorageSettingsProps)
const resetToDefaults = useSettingsStore((s) => s.resetToDefaults);
const exportSettings = useSettingsStore((s) => s.exportSettings);
const importSettings = useSettingsStore((s) => s.importSettings);
+ // The organisation can turn settings export and import off (webmail
+ // about-data-settings.tsx).
+ const exportAllowed = usePolicyFeature('settingsExportEnabled');
const [confirmReset, setConfirmReset] = useState(false);
@@ -229,19 +233,21 @@ export function StorageSettings({ onOpenTroubleshooting }: StorageSettingsProps)
title={t('settings.backup.title', 'Settings backup')}
description={t('settings.backup.description', 'Move your settings to another phone or the webmail.')}
>
-
-
-
-
-
-
+ {exportAllowed && (
+
+
+
+
+
+
+ )}
{
expect(page).toMatch(/\{showExternalContent && \(\s* {
+ const page = settings('StorageSettings');
+ expect(page).toContain("const exportAllowed = usePolicyFeature('settingsExportEnabled');");
+ expect(page).toMatch(/\{exportAllowed && \(\s*\s*\)\}/);
+ });
});