#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
fix(editor): respect no-login settings visibility in config navigation (#6807)
Ludy4230d2902b3c
diff --git a/frontend/editor/src/core/components/shared/AppConfigModal.tsx b/frontend/editor/src/core/components/shared/AppConfigModal.tsxindex 83f7342a74..1a9485cce8 100644--- a/frontend/editor/src/core/components/shared/AppConfigModal.tsx+++ b/frontend/editor/src/core/components/shared/AppConfigModal.tsx@@ -216,6 +216,7 @@ const AppConfigModalInner: React.FC<AppConfigModalProps> = ({runningEE,loginEnabled,handleCloseSync,+ config?.showSettingsWhenNoLogin ?? true,);const configNavSections = useMemo(() =>diff --git a/frontend/editor/src/core/components/shared/config/configNavSections.tsx b/frontend/editor/src/core/components/shared/config/configNavSections.tsxindex 0c9515b68c..b4a8748434 100644--- a/frontend/editor/src/core/components/shared/config/configNavSections.tsx+++ b/frontend/editor/src/core/components/shared/config/configNavSections.tsx@@ -32,6 +32,7 @@ export const useConfigNavSections = (_runningEE: boolean = false,_loginEnabled: boolean = false,onRequestClose: () => void = () => {},+ _showSettingsWhenNoLogin: boolean = true,): ConfigNavSection[] => {const { t } = useTranslation();diff --git a/frontend/editor/src/desktop/components/shared/config/configNavSections.tsx b/frontend/editor/src/desktop/components/shared/config/configNavSections.tsxindex 07afc16599..9a638d1461 100644--- a/frontend/editor/src/desktop/components/shared/config/configNavSections.tsx+++ b/frontend/editor/src/desktop/components/shared/config/configNavSections.tsx@@ -23,6 +23,7 @@ export const useConfigNavSections = (runningEE: boolean = false,loginEnabled: boolean = false,onRequestClose: () => void = () => {},+ showSettingsWhenNoLogin: boolean = true,): ConfigNavSection[] => {const { t } = useTranslation();@@ -53,6 +54,7 @@ export const useConfigNavSections = (runningEE,loginEnabled,onRequestClose,+ showSettingsWhenNoLogin,);const connectionModeSection: ConfigNavSection = {diff --git a/frontend/editor/src/proprietary/components/shared/config/configNavSections.tsx b/frontend/editor/src/proprietary/components/shared/config/configNavSections.tsxindex f9c19f8a7b..0081c594a3 100644--- a/frontend/editor/src/proprietary/components/shared/config/configNavSections.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configNavSections.tsx@@ -32,6 +32,7 @@ export const useConfigNavSections = (runningEE: boolean = false,loginEnabled: boolean = false,onRequestClose: () => void = () => {},+ showSettingsWhenNoLogin: boolean = true,): ConfigNavSection[] => {const { t } = useTranslation();@@ -41,6 +42,7 @@ export const useConfigNavSections = (runningEE,loginEnabled,onRequestClose,+ showSettingsWhenNoLogin,);// Add account management under Preferences@@ -64,8 +66,9 @@ export const useConfigNavSections = (}}- // Add Admin sections if user is admin OR if login is disabled (but mark as disabled)- if (isAdmin || !loginEnabled) {+ // Add Admin sections for admins. When login is disabled, keep the historical+ // read-only admin preview only if system.showSettingsWhenNoLogin allows it.+ if (isAdmin || (!loginEnabled && showSettingsWhenNoLogin)) {const requiresLogin = !loginEnabled;const enableLoginTooltip = t("settings.tooltips.enableLoginFirst",