diff --git a/assets/src/dashboard/app/index.js b/assets/src/dashboard/app/index.js index 684aa6ea3938..b4dfedaaaed9 100644 --- a/assets/src/dashboard/app/index.js +++ b/assets/src/dashboard/app/index.js @@ -65,9 +65,7 @@ const AppContent = () => { state: { currentPath }, } = useRouteHistory(); - const { capabilities: { canManageSettings } = {} } = useConfig(); - const enableSettingsView = - useFeature('enableSettingsView') && canManageSettings; + const enableSettingsView = useFeature('enableSettingsView'); useEffect(() => { const dynamicPageTitle = ROUTE_TITLES[currentPath] || ROUTE_TITLES.DEFAULT; diff --git a/assets/src/dashboard/app/views/editorSettings/index.js b/assets/src/dashboard/app/views/editorSettings/index.js index bb152db29b68..44f6007704a2 100644 --- a/assets/src/dashboard/app/views/editorSettings/index.js +++ b/assets/src/dashboard/app/views/editorSettings/index.js @@ -85,7 +85,7 @@ function EditorSettings() { ); const { - capabilities: { canUploadFiles } = {}, + capabilities: { canUploadFiles, canManageSettings } = {}, maxUpload, maxUploadFormatted, } = useConfig(); @@ -110,7 +110,9 @@ function EditorSettings() { */ useEffect(() => { - fetchSettings(); + if ( canManageSettings ) { + fetchSettings(); + } }, [fetchSettings]); useEffect(() => { @@ -263,18 +265,20 @@ function EditorSettings() {
- - + /> } + { canManageSettings && + + }